Skip to content

Commit 634d830

Browse files
committed
match headers only at the beggining of the file or after a blank line
fixes issue #95 TODO: handle headers after YAML blocks, etc.
1 parent 27139a1 commit 634d830

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

syntax/pandoc.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ call s:WithConceal("strikeout", 'syn match pandocStrikeoutMark /\~\~/ contained
295295

296296
" Headers: {{{1
297297
"
298-
syn match pandocAtxHeader /^\s*#\{1,6}.*\n/ contains=pandocEmphasis,pandocStrong,pandocNoFormatted,@Spell display
298+
syn match pandocAtxHeader /\(\%^\|^\s*\n\)\@<=\s*#\{1,6}.*\n/ contains=pandocEmphasis,pandocStrong,pandocNoFormatted,@Spell display
299299
syn match pandocAtxHeaderMark /\(^\s*#\{1,6}\|\\\@<!#*\(\s*.*$\)\@=\)/ contained containedin=pandocAtxHeader
300300
call s:WithConceal("atx", 'syn match pandocAtxStart /#/ contained containedin=pandocAtxHeaderMark', 'conceal cchar='.s:cchars["atx"])
301301
syn match pandocSetexHeader /^.\+\n[=]\+$/ contains=pandocEmphasis,pandocStrong,pandocNoFormatted,@Spell

0 commit comments

Comments
 (0)