Browse Source

Lines which start with '-' are needed in foldexpr

Hiroshi Shirosaki 3 years ago
parent
commit
ed456d2ee6
2 changed files with 5 additions and 1 deletions
  1. 1
    1
      after/ftplugin/markdown.vim
  2. 4
    0
      test/folding.md

+ 1
- 1
after/ftplugin/markdown.vim View File

@@ -12,7 +12,7 @@ endfunc
12 12
 
13 13
 func! s:effective_line(lnum)
14 14
     let line = getline(a:lnum)
15
-    return (line !~ '^=\|^#' || s:is_mkdCode(a:lnum)) ? '' : line
15
+    return (line !~ '^[=-#]' || s:is_mkdCode(a:lnum)) ? '' : line
16 16
 endfunc
17 17
 
18 18
 func! Foldexpr_markdown(lnum)

+ 4
- 0
test/folding.md View File

@@ -10,3 +10,7 @@ This is code block
10 10
 ## Capter 2
11 11
 
12 12
 foobar
13
+
14
+==+ Fold Level 1
15
+
16
+--+ Fold Level 2

Loading…
Cancel
Save