Skip to content

Commit ad853fe

Browse files
doronbeharalerque
authored andcommitted
Patch for code inside brackets breaking fulther code highlighting, fix 238 (#248)
Copy syntax rule for links from `$VIMRUNTIME/syntax/markdown.vim`.
1 parent 56e8e41 commit ad853fe

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
@@ -264,7 +264,7 @@ syn match pandocLinkTip /\s*".\{-}"/ contained containedin=pandocReferenceURL co
264264
call s:WithConceal("image", 'syn match pandocImageIcon /!\[\@=/ display', 'conceal cchar='. s:cchars["image"])
265265
" }}}
266266
" Definitions: {{{3
267-
syn region pandocReferenceDefinition start=/\[.\{-}\]:/ end=/\(\n\s*".*"$\|$\)/ keepend
267+
syn region pandocReferenceDefinition start="!\=\[\%(\_[^]]*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" keepend
268268
syn match pandocReferenceDefinitionLabel /\[\zs.\{-}\ze\]:/ contained containedin=pandocReferenceDefinition display
269269
syn match pandocReferenceDefinitionAddress /:\s*\zs.*/ contained containedin=pandocReferenceDefinition
270270
syn match pandocReferenceDefinitionTip /\s*".\{-}"/ contained containedin=pandocReferenceDefinition,pandocReferenceDefinitionAddress contains=@Spell,pandocAmpersandEscape

0 commit comments

Comments
 (0)