Skip to content

Commit 5056e63

Browse files
authored
Fix things that look like tables in code blocks (#361)
When I have a markdown document that looks like this: ```yaml --- foo: bar --- ``` the `pandocDelimitedCodeBlockStart` region was tricking the `ALLBUT`, making Vim think that it should treat the `---` as the start of a simple table, even though it was inside a code block.
1 parent aba6b55 commit 5056e63

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
@@ -407,7 +407,7 @@ syn match pandocLineBlockDelimiter /^|/ contained containedin=pandocLineBlock
407407
" Tables: {{{2
408408

409409
" Simple: {{{3
410-
syn region pandocSimpleTable start=/\%#=2\(^.*[[:graph:]].*\n\)\@<!\(^.*[[:graph:]].*\n\)\(-\{2,}\s*\)\+\n\n\@!/ end=/\n\n/ containedin=ALLBUT,pandocDelimitedCodeBlock,pandocYAMLHeader keepend
410+
syn region pandocSimpleTable start=/\%#=2\(^.*[[:graph:]].*\n\)\@<!\(^.*[[:graph:]].*\n\)\(-\{2,}\s*\)\+\n\n\@!/ end=/\n\n/ containedin=ALLBUT,pandocDelimitedCodeBlock,pandocDelimitedCodeBlockStart,pandocYAMLHeader keepend
411411
syn match pandocSimpleTableDelims /\-/ contained containedin=pandocSimpleTable
412412
syn match pandocSimpleTableHeader /\%#=2\(^.*[[:graph:]].*\n\)\@<!\(^.*[[:graph:]].*\n\)/ contained containedin=pandocSimpleTable
413413

0 commit comments

Comments
 (0)