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:
		@@ -3546,6 +3546,8 @@ Removed:~
 | 
				
			|||||||
      point.
 | 
					      point.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Fixed:~
 | 
					Fixed:~
 | 
				
			||||||
 | 
					    * Issue #212: Don't treat comment characters within code blocks as
 | 
				
			||||||
 | 
					      headers.
 | 
				
			||||||
    * PR #744: Fix typo in vimwiki_list_manipulation
 | 
					    * PR #744: Fix typo in vimwiki_list_manipulation
 | 
				
			||||||
    * Issue #715: s:clean_url is compatible with vim pre 7.4.1546 (sticky type
 | 
					    * Issue #715: s:clean_url is compatible with vim pre 7.4.1546 (sticky type
 | 
				
			||||||
      checking)
 | 
					      checking)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -143,7 +143,7 @@ function! VimwikiFoldLevel(lnum)
 | 
				
			|||||||
  let line = getline(a:lnum)
 | 
					  let line = getline(a:lnum)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  " Header/section folding...
 | 
					  " 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)
 | 
					    return '>'.vimwiki#u#count_first_sym(line)
 | 
				
			||||||
  " Code block folding...
 | 
					  " Code block folding...
 | 
				
			||||||
  elseif line =~# vimwiki#vars#get_syntaxlocal('rxPreStart')
 | 
					  elseif line =~# vimwiki#vars#get_syntaxlocal('rxPreStart')
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user