diff --git a/syntax/pandoc.vim b/syntax/pandoc.vim index 0bd6b2c..65c2072 100644 --- a/syntax/pandoc.vim +++ b/syntax/pandoc.vim @@ -81,7 +81,7 @@ endif if !exists("g:pandoc#syntax#conceal#backslash") let g:pandoc#syntax#conceal#backslash = 0 endif -"}}}2 +"}}}2" " leave specified codeblocks as Normal (i.e. 'unhighlighted') {{{2 if !exists("g:pandoc#syntax#codeblocks#ignore") let g:pandoc#syntax#codeblocks#ignore = [] @@ -275,12 +275,12 @@ syn match pandocAutomaticLink /<\(https\{0,1}.\{-}\|[A-Za-z0-9!#$%&'*+\-/=?^_`{| "}}} " Citations: {{{2 " parenthetical citations -syn match pandocPCite /\^\@~\/]*.\{-}\]/ contains=pandocEmphasis,pandocStrong,pandocLatex,pandocCiteKey,@Spell,pandocAmpersandEscape display +syn match pandocPCite /\^\@~\/]*\_.\{-}\]/ contains=pandocEmphasis,pandocStrong,pandocLatex,pandocCiteKey,@Spell,pandocAmpersandEscape display " in-text citations with location syn match pandocICite /@[[:alnum:]_][[:alnum:]äëïöüáéíóúàèìòùłßÄËÏÖÜÁÉÍÓÚÀÈÌÒÙŁß_:.#$%&\-+?<>~\/]*\s\[.\{-1,}\]/ contains=pandocCiteKey,@Spell display " cite keys syn match pandocCiteKey /\(-\=@[[:alnum:]_][[:alnum:]äëïöüáéíóúàèìòùłßÄËÏÖÜÁÉÍÓÚÀÈÌÒÙŁß_:.#$%&\-+?<>~\/]*\)/ containedin=pandocPCite,pandocICite contains=@NoSpell display -syn match pandocCiteAnchor /[-@]/ contained containedin=pandocCiteKey display +syn match pandocCiteAnchor /-*@/ contained containedin=pandocCiteKey display syn match pandocCiteLocator /[\[\]]/ contained containedin=pandocPCite,pandocICite " }}} " Text Styles: {{{2 @@ -495,6 +495,13 @@ syn region pandocYAMLHeader start=/\%(\%^\|\_^\s*\n\)\@<=\_^-\{3}\ze\n.\+/ end=/ "}}} "}}}1 +" Pandoc-Crossref: {{{1 + +syn match pandocCrossrefAttr /{.*}$/ +syn match pandocCrossrefID /#eq:\w*/ contained containedin=pandocCrossrefAttr + +" }}} + " Styling: {{{1 hi link pandocOperator Operator @@ -507,6 +514,9 @@ hi link pandocSetexHeader Title hi link pandocHeaderAttr Comment hi link pandocHeaderID Identifier +hi link pandocCrossrefAttr pandocHeaderAttr +hi link pandocCrossrefID pandocHeaderID + hi link pandocLaTexSectionCmd texSection hi link pandocLaTeXDelimiter texDelimiter