install.fairie/dotfiles/.vim/plugged/vim-markdown/test/folding.vader
Git E2E Dev Test Username 78b956b821 git subrepo clone https://github.com/plasticboy/vim-markdown.git ./dotfiles/.vim/plugged/vim-markdown
subrepo:
  subdir:   "dotfiles/.vim/plugged/vim-markdown"
  merged:   "c3f83ebb"
upstream:
  origin:   "https://github.com/plasticboy/vim-markdown.git"
  branch:   "master"
  commit:   "c3f83ebb"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"
2022-10-18 10:36:20 -04:00

53 lines
942 B
Text

Before:
source ../after/ftplugin/markdown.vim
After:
setlocal foldexpr=0
setlocal foldmethod=manual
Given markdown;
# Title
## Chapter 1
```
This is code block
# This is just a comment
```
## Capter 2
foobar
Execute (fold level # in code block):
AssertEqual foldlevel(1), 0, '# Title'
AssertEqual foldlevel(3), 1, '## Chapter 1'
AssertEqual foldlevel(7), 2, '# This is just a comment'
AssertEqual foldlevel(8), 2, '```'
AssertEqual foldlevel(10), 1, '## Chapter 2'
AssertEqual foldlevel(12), 2, 'foobar'
Given markdown;
Fold Level 1
============
Fold Level 2
------------
Execute (fold level ==, --):
AssertEqual foldlevel(2), 1, '=='
AssertEqual foldlevel(4), 2, '--'
Given markdown;
# H1
## H1.1
## H1.2
# H2
Execute (fold level # in last line):
AssertEqual foldlevel(1), 0, '# H1'
AssertEqual foldlevel(3), 1, '## H1.1'
AssertEqual foldlevel(5), 1, '## H1.2'
AssertEqual foldlevel(7), 0, '# H2'