Skip to content

Commit 82a023f

Browse files
committed
allow header after lines containing tags
fixes issue #108 also, fix regression about atx headers
1 parent 501b3e6 commit 82a023f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

syntax/pandoc.vim

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,9 @@ call s:WithConceal("strikeout", 'syn match pandocStrikeoutMark /\~\~/ contained
308308

309309
" Headers: {{{1
310310
"
311-
syn match pandocAtxHeader /\(\%^\|^\s*\n\)\@<=#\{1,6}.*\n/ contains=pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,@Spell, display
311+
syn match pandocAtxHeader /\(\%^\|<.\+>.*\n\|^\s*\n\)\@<=#\{1,6}.*\n/ contains=pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,@Spell, display
312312
syn match pandocAtxHeaderMark /\(^#\{1,6}\|\\\@<!#\+\(\s*.*$\)\@=\)/ contained containedin=pandocAtxHeader
313-
"call s:WithConceal("atx", 'syn match pandocAtxStart /#/ contained containedin=pandocAtxHeaderMark', 'conceal cchar='.s:cchars["atx"])
314-
syn match pandocAtxStart /#\+\s*/ contained containedin=pandocAtxHeaderMark conceal
313+
call s:WithConceal("atx", 'syn match pandocAtxStart /#/ contained containedin=pandocAtxHeaderMark', 'conceal cchar='.s:cchars["atx"])
315314
syn match pandocSetexHeader /^.\+\n[=]\+$/ contains=pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,@Spell
316315
syn match pandocSetexHeader /^.\+\n[-]\+$/ contains=pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,@Spell
317316
syn match pandocHeaderAttr /{.*}/ contained containedin=pandocAtxHeader,pandocSetexHeader

0 commit comments

Comments
 (0)