Skip to content

Commit 9be8158

Browse files
committed
Fix pandocPipeTable highlighting
For some of my Markdown projects, I use 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. # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Fri Sep 25 02:38:19 2015 -0400 # # On branch fix/pandoc-pipe-tables # Changes to be committed: # modified: syntax/pandoc.vim #
1 parent ea15560 commit 9be8158

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)