Skip to content

Commit 9d02949

Browse files
committed
Fix pandocPipeTable highlighting
For some of my Markdown projects, I use the kramdown which has support for block inline attribute lists. The code to check for piped tables doesn't quite play nicely when I try to add a class to it. For example, in the following snippit the table never ends according to the current code: ```markdown | Heading 1 | Heading 2 | | --------- | --------- | | vim-pandoc-syntax | is | | so | great | {:sparkling} ## Not Styled as Heading! Oh noes :'( ``` This fixes the problem by just checking to see if there's a `{` character there.
1 parent ea15560 commit 9d02949

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
@@ -357,7 +357,7 @@ syn match pandocGridTableHeader /\%#=2\(^.*\n\)\(+=.*\)\@=/ contained containedi
357357
"}}}3
358358
" Pipe: {{{3
359359
" with beginning and end pipes
360-
syn region pandocPipeTable start=/\%#=2\([+|]\n\)\@<!\n\@1<=|\(.*|\)\@=/ end=/|.*\n\n/ containedin=ALLBUT,pandocDelimitedCodeBlock,pandocYAMLHeader keepend
360+
syn region pandocPipeTable start=/\%#=2\([+|]\n\)\@<!\n\@1<=|\(.*|\)\@=/ end=/|.*\n\(\n\|{\)/ containedin=ALLBUT,pandocDelimitedCodeBlock,pandocYAMLHeader keepend
361361
" without beginning and end pipes
362362
syn region pandocPipeTable start=/\%#=2^.*\n-.\{-}|/ end=/|.*\n\n/ keepend
363363
syn match pandocPipeTableDelims /[\|\-:+]/ contained containedin=pandocPipeTable

0 commit comments

Comments
 (0)