Skip to content

Commit ce9a933

Browse files
committed
some improvements to pandocNoLabel
ref: issue #121
1 parent 8f02562 commit ce9a933

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
@@ -239,7 +239,7 @@ else
239239
syn region pandocReferenceURL matchgroup=Operator start=/\]\@1<=(/ end=/)/ keepend display
240240
endif
241241
" let's not consider "a [label] a" as a label, remove formatting - Note: breaks implicit links
242-
syn match pandocNoLabel /\]\@1<!\s\+\[[^\[\]]\{-}\]\s\+[\[(]\@!/ contains=pandocPCite
242+
syn match pandocNoLabel /\]\@1<!\(\s\+\|^\)\[[^\[\]]\{-}\]\(\s\+\|$\)[\[(]\@!/ contains=pandocPCite
243243
syn match pandocLinkTip /\s*".\{-}"/ contained containedin=pandocReferenceURL contains=@Spell display
244244
call s:WithConceal("image", 'syn match pandocImageIcon /!\[\@=/ display', 'conceal cchar='. s:cchars["image"])
245245
" }}}

0 commit comments

Comments
 (0)