Skip to content

Commit 76812f5

Browse files
authored
Support multiline embedded HTML tags (#350)
As far as I know HTML tags spanning multiple lines are valid. For example, ``` <div class="averylongclass" id="averylongid"> foo </div> ``` is valid HTML. Currently, only single line HTML tags are highlighted, while multiline tags are not. This PR highlights embedded multiline tags.
1 parent 36509e9 commit 76812f5

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
@@ -246,7 +246,7 @@ endif
246246
" HTML: {{{3
247247
" Set embedded HTML highlighting
248248
syn include @HTML syntax/html.vim
249-
syn match pandocHTML /<\/\?\a.\{-}>/ contains=@HTML
249+
syn match pandocHTML /<\/\?\a\_.\{-}>/ contains=@HTML
250250
" Support HTML multi line comments
251251
syn region pandocHTMLComment start=/<!--\s\=/ end=/\s\=-->/ keepend contains=pandocHTMLCommentStart,pandocHTMLCommentEnd
252252
call s:WithConceal('html_c_s', 'syn match pandocHTMLCommentStart /<!--/ contained', 'conceal cchar='.s:cchars['html_c_s'])

0 commit comments

Comments
 (0)