Exclude code block comments from header folding.

This makes sure comment characters that match markdown folding are not
recognized as a header and folder. Fixes #212, Fixes #756.
This commit is contained in:
Rane Brown committed 2019-10-16 22:31:42 -06:00
1 parent a42cd58636
commit 4bc6ff4547
2 files changed
+3 -1

No files matched your search

+1 -1
View File
@@ -143,7 +143,7 @@ function! VimwikiFoldLevel(lnum)
let line = getline(a:lnum)
" Header/section folding...
if line =~# vimwiki#vars#get_syntaxlocal('rxHeader')
if line =~# vimwiki#vars#get_syntaxlocal('rxHeader') && !vimwiki#u#is_codeblock(a:lnum)
return '>'.vimwiki#u#count_first_sym(line)
" Code block folding...
elseif line =~# vimwiki#vars#get_syntaxlocal('rxPreStart')