vim-pandoc-syntax icon indicating copy to clipboard operation
vim-pandoc-syntax copied to clipboard

Feature Request: support fenced div blocks

Open op8867555 opened this issue 7 years ago • 3 comments

Hi, Pandoc supports fenced DIV blocks after v2.0. The syntax highlight conflicts with definition lists. As a workaround, I set use_definition_lists = 0 to render fenced_divs correctly.

Please consider implementing this syntax into this awesome plugin :)

op8867555 avatar Jan 16 '18 10:01 op8867555

I'm going to say this is more than a feature request: this is a basic bit of Pandoc's syntax that differs from regular Markdown syntax and using it blows the highlighting to bits without a workaround. Even if we don't do anything super special with the blocks, using them shouldn't break the plugin.

alerque avatar Apr 16 '19 10:04 alerque

See also https://github.com/jgm/pandoc/issues/5461.

alerque avatar Apr 22 '19 07:04 alerque

Does the code below work? I added it to syntax/rmd.vim and didn't note any side effects yet.

syn match pandocDivBegin '^:::\+ {.\{-}}' contains=pandocHeaderAttr
syn match pandocDivEnd '^:::\+$'
hi def link pandocDivBegin Delimiter
hi def link pandocDivEnd Delimiter

jalvesaq avatar Apr 17 '22 19:04 jalvesaq