@@ -19,13 +19,13 @@ endif
1919" cchars used in conceal rules {{{2
2020" utf-8 defaults (preferred)
2121if &encoding == " utf-8"
22- let s: cchars = {
23- \" newline" : " ↵" ,
24- \" image" : " ▨" ,
25- \" super" : " ⁿ" ,
26- \" sub" : " ₙ" ,
27- \" strike" : " x ̶" ,
28- \" atx" : " §" ,
22+ let s: cchars = {
23+ \" newline" : " ↵" ,
24+ \" image" : " ▨" ,
25+ \" super" : " ⁿ" ,
26+ \" sub" : " ₙ" ,
27+ \" strike" : " x ̶" ,
28+ \" atx" : " §" ,
2929 \" codelang" : " λ" ,
3030 \" codeend" : " —" ,
3131 \" abbrev" : " →" ,
@@ -36,13 +36,13 @@ if &encoding == "utf-8"
3636 \" html_c_e" : " ›" }
3737else
3838 " ascii defaults
39- let s: cchars = {
40- \" newline" : " " ,
41- \" image" : " i " ,
42- \" super" : " ^" ,
43- \" sub" : " _" ,
44- \" strike" : " ~" ,
45- \" atx" : " #" ,
39+ let s: cchars = {
40+ \" newline" : " " ,
41+ \" image" : " i " ,
42+ \" super" : " ^" ,
43+ \" sub" : " _" ,
44+ \" strike" : " ~" ,
45+ \" atx" : " #" ,
4646 \" codelang" : " l " ,
4747 \" codelang" : " - " ,
4848 \" abbrev" : " a " ,
@@ -63,7 +63,7 @@ if !exists("g:pandoc#syntax#conceal#urls")
6363 let g: pandoc #syntax #conceal#urls = 0
6464endif
6565" should backslashes in escapes be concealed? {{{2
66- if ! exists (" g:pandoc#syntax#conceal#backslash" )
66+ if ! exists (" g:pandoc#syntax#conceal#backslash" )
6767 let g: pandoc #syntax #conceal#backslash = 0
6868endif
6969" }}}2
@@ -132,7 +132,7 @@ function! EnableEmbedsforCodeblocksWithLang(entry)
132132 \' contains= @ ' . toupper (s: langname )
133133 exe " syn region pandocDelimitedCodeBlockinBlockQuote_" . s: langname . ' start=/>\s\(`\{3,}`*\|\~\{3,}\~*\)\s*\%({[^.]*\.\)\=' . s: langname . ' \>/' .
134134 \ ' end=/\(`\{3,}`*\|\~\{3,}\~*\)/ contained containedin=pandocDelimitedCodeBlock' .
135- \' contains= @ ' . toupper (s: langname ) .
135+ \' contains= @ ' . toupper (s: langname ) .
136136 \" ,pandocDelimitedCodeBlockStart,pandocDelimitedCodeBlockEnd,pandodDelimitedCodeblockLang,pandocBlockQuoteinDelimitedCodeBlock"
137137 catch /E484/
138138 echo " No syntax file found for '" . s: langsyntaxfile . " '"
@@ -197,22 +197,22 @@ call s:WithConceal('html_c_e', 'syn match pandocHTMLCommentEnd /-->/ contained',
197197" Unset current_syntax so the 2nd include will work
198198unlet b: current_syntax
199199syn include @LATEX syntax/tex.vim
200- syn region pandocLaTeXInlineMath start =/ \\\@ <!\$ [[:graph:]]\@ =/ end =/ \\\@ <!\$ / keepend contains =@LATEX
201- syn region pandocLaTeXInlineMath start =/ \\\@ <!\\ ([[:graph:]]\@ =/ end =/ \\\@ <!\\ )/ keepend contains =@LATEX
200+ syn region pandocLaTeXInlineMath start =/ \\\@ <!\$ [[:graph:]]\@ =/ end =/ \\\@ <!\$ / keepend contains =@LATEX
201+ syn region pandocLaTeXInlineMath start =/ \\\@ <!\\ ([[:graph:]]\@ =/ end =/ \\\@ <!\\ )/ keepend contains =@LATEX
202202syn match pandocProtectedFromInlineLaTeX / \\\@ <!\$ {.*}\(\(\s\| [[:punct:]]\)\( [^$]*\| .*\(\\\$ .*\)\{ 2}\)\n\n\| $\)\@ =/ display
203203" contains=@LATEX
204204syn region pandocLaTeXMathBlock start =/ \$\$ / end =/ \$\$ / keepend contains =@LATEX
205- syn match pandocLaTeXCommand / \\ [[:alpha:]]\+\(\( {.\{ -}}\)\=\(\[ .\{ -}\]\)\=\) */ contains =@LATEX
205+ syn match pandocLaTeXCommand / \\ [[:alpha:]]\+\(\( {.\{ -}}\)\=\(\[ .\{ -}\]\)\=\) */ contains =@LATEX
206206syn region pandocLaTeXRegion start =/ \\ begin{\z (.\{ -}\) }/ end =/ \\ end{\z 1}/ keepend contains =@LATEX
207207" we rehighlight sectioning commands, because otherwise tex.vim captures all text until EOF or a new sectioning command
208208syn region pandocLaTexSection start =/ \\\( part\| chapter\|\( sub\)\{ ,2}section\|\( sub\)\= paragraph\)\*\=\(\[ .*\]\)\= {/ end =/ \} / keepend
209- syn match pandocLaTexSectionCmd / \\\( part\| chapter\|\( sub\)\{ ,2}section\|\( sub\)\= paragraph\) / contained containedin =pandocLaTexSection
209+ syn match pandocLaTexSectionCmd / \\\( part\| chapter\|\( sub\)\{ ,2}section\|\( sub\)\= paragraph\) / contained containedin =pandocLaTexSection
210210syn match pandocLaTeXDelimiter / [[\] {}]/ contained containedin=pandocLaTexSection
211211" }}}}
212212" }}}2
213213" Titleblock: {{{2
214214"
215- syn region pandocTitleBlock start =/ \% ^%/ end =/ \n\n / contains =pandocReferenceLabel,pandocReferenceURL,pandocNewLine
215+ syn region pandocTitleBlock start =/ \% ^%/ end =/ \n\n / contains =pandocReferenceLabel,pandocReferenceURL,pandocNewLine
216216call s: WithConceal (" titleblock" , ' syn match pandocTitleBlockMark /%\ / contained containedin=pandocTitleBlock,pandocTitleBlockTitle' , ' conceal' )
217217syn match pandocTitleBlockTitle / \% ^%.*\n / contained containedin =pandocTitleBlock
218218" }}}
@@ -235,12 +235,12 @@ syn region pandocReferenceLabel matchgroup=Operator start=/!\{,1}\\\@<!\[/ skip=
235235if g: pandoc #syntax #conceal#urls == 1
236236 syn region pandocReferenceURL matchgroup =Operator start =/ \]\@ 1<=(/ end =/ )/ keepend display conceal
237237else
238- syn region pandocReferenceURL matchgroup =Operator start =/ \]\@ 1<=(/ end =/ )/ keepend display
238+ syn region pandocReferenceURL matchgroup =Operator start =/ \]\@ 1<=(/ end =/ )/ keepend display
239239endif
240240" let's not consider "a [label] a" as a label, remove formatting - Note: breaks implicit links
241241syn match pandocNoLabel / \]\@ 1<!\(\s\{ ,3}\| ^\)\[ [^\[\] ]\{ -}\]\(\s\+\| $\) [\[ (]\@ !/ contains =pandocPCite
242242syn match pandocLinkTip / \s *".\{ -}"/ contained containedin =pandocReferenceURL contains =@Spell display
243- call s: WithConceal (" image" , ' syn match pandocImageIcon /!\[\@=/ display' , ' conceal cchar=' . s: cchars [" image" ])
243+ call s: WithConceal (" image" , ' syn match pandocImageIcon /!\[\@=/ display' , ' conceal cchar=' . s: cchars [" image" ])
244244" }}}
245245" Definitions: {{{3
246246syn region pandocReferenceDefinition start =/ \[ .\{ -}\] :/ end =/ \(\n\s *".*"$\| $\) / keepend
@@ -297,7 +297,7 @@ call s:WithConceal("inlinecode", 'syn region pandocNoFormattedInEmphasis matchgr
297297call s: WithConceal (" inlinecode" , ' syn region pandocNoFormattedInStrong matchgroup=Operator start=/\\\@<!``/ end=/\\\@<!``/ nextgroup=pandocNoFormattedAttrs contained' , ' concealends' )
298298syn match pandocNoFormattedAttrs / {.\{ -}}/ contained
299299" }}}
300- " Subscripts: {{{3
300+ " Subscripts: {{{3
301301syn region pandocSubscript start =/ \~\(\( [[:graph:]]\(\\ \)\=\)\{ -}\~\)\@ =/ end =/ \~ / keepend
302302call s: WithConceal (" subscript" , ' syn match pandocSubscriptMark /\~/ contained containedin=pandocSubscript' , ' conceal cchar=' .s: cchars [" sub" ])
303303" }}}
@@ -341,11 +341,11 @@ syn region pandocTableMultilineHeader start=/\%#=2\(^-\+\n\)\@<=./ end=/\%#=2\n-
341341syn region pandocGridTable start =/ \% #=2\n\@ 1<=+-/ end =/ +\n\n / containedin =ALLBUT,pandocDelimitedCodeBlock,pandocYAMLHeader keepend
342342syn match pandocGridTableDelims / [\| =]/ contained containedin =pandocGridTable
343343syn match pandocGridTableDelims / \% #=2\( [\- +][\- +=]\@ =\| [\- +=]\@ 1<=[\- +]\) / contained containedin =pandocGridTable
344- syn match pandocGridTableHeader / \% #=2\( ^.*\n\)\( +=.*\)\@ =/ contained containedin =pandocGridTable
344+ syn match pandocGridTableHeader / \% #=2\( ^.*\n\)\( +=.*\)\@ =/ contained containedin =pandocGridTable
345345" }}}3
346346" Pipe: {{{3
347347" with beginning and end pipes
348- syn region pandocPipeTable start =/ \% #=2\( [+|]\n\)\@ <!\n\@ 1<=|\( .*|\)\@ =/ end =/ |.*\n\(\n\| {\) / containedin =ALLBUT,pandocDelimitedCodeBlock,pandocYAMLHeader keepend
348+ syn region pandocPipeTable start =/ \% #=2\( [+|]\n\)\@ <!\n\@ 1<=|\( .*|\)\@ =/ end =/ |.*\n\(\n\| {\) / containedin =ALLBUT,pandocDelimitedCodeBlock,pandocYAMLHeader keepend
349349" without beginning and end pipes
350350syn region pandocPipeTable start =/ \% #=2^.*\n -.\{ -}|/ end =/ |.*\n\n / keepend
351351syn match pandocPipeTableDelims / [\|\- :+]/ contained containedin =pandocPipeTable
@@ -359,7 +359,7 @@ syn match pandocTableHeaderWord /\<.\{-}\>/ contained containedin=pandocGridTabl
359359syn region pandocDelimitedCodeBlock start =/ ^\( >\s\)\?\z (\(\s\{ 4,}\)\=\~\{ 3,}\~ *\) / end =/ ^\z 1\~ */ skipnl contains =pandocDelimitedCodeBlockStart,pandocDelimitedCodeBlockEnd keepend
360360syn region pandocDelimitedCodeBlock start =/ ^\( >\s\)\?\z (\(\s\{ 4,}\)\= `\{ 3,}`*\) / end =/ ^\z 1`*/ skipnl contains =pandocDelimitedCodeBlockStart,pandocDelimitedCodeBlockEnd keepend
361361call s: WithConceal (" codeblock_start" , ' syn match pandocDelimitedCodeBlockStart /\(\_^\n\_^\(>\s\)\?\(\s\{4,}\)\=\)\@<=\(\~\{3,}\~*\|`\{3,}`*\)/ contained containedin=pandocDelimitedCodeBlock nextgroup=pandocDelimitedCodeBlockLanguage' , ' conceal cchar=' .s: cchars [" codelang" ])
362- syn match pandocDelimitedCodeBlockLanguage / \(\s\?\)\@ <=.\+\(\_ $\)\@ =/ contained
362+ syn match pandocDelimitedCodeBlockLanguage / \(\s\?\)\@ <=.\+\(\_ $\)\@ =/ contained
363363call s: WithConceal (" codeblock_delim" , ' syn match pandocDelimitedCodeBlockEnd /\(`\{3,}`*\|\~\{3,}\~*\)\(\_$\n\(>\s\)\?\_$\)\@=/ contained containedin=pandocDelimitedCodeBlock' , ' conceal cchar=' .s: cchars [" codeend" ])
364364syn match pandocBlockQuoteinDelimitedCodeBlock ' ^>' contained containedin =pandocDelimitedCodeBlock
365365syn match pandocCodePre / <pre>.\{ -}<\/ pre>/ skipnl
@@ -390,7 +390,7 @@ call s:WithConceal('abbrev', 'syn match pandocAbbreviationTail /\]/ contained co
390390"
391391syn match pandocFootnoteID / \[\^ [^\] ]\+\] / nextgroup =pandocFootnoteDef
392392" Inline footnotes
393- syn region pandocFootnoteDef start =/ \^\[ / end =/ \] / contains =pandocReferenceLabel,pandocReferenceURL,pandocLatex,pandocPCite,,pandocEnDash,pandocEmDash,pandocEllipses,pandocBeginQuote,pandocEndQuote,@Spell skipnl keepend
393+ syn region pandocFootnoteDef start =/ \^\[ / end =/ \] / contains =pandocReferenceLabel,pandocReferenceURL,pandocLatex,pandocPCite,,pandocEnDash,pandocEmDash,pandocEllipses,pandocBeginQuote,pandocEndQuote,@Spell skipnl keepend
394394call s: WithConceal (" footnote" , ' syn match pandocFootnoteDefHead /\^\[/ contained containedin=pandocFootnoteDef' , ' conceal cchar=' .s: cchars [" footnote" ])
395395call s: WithConceal (" footnote" , ' syn match pandocFootnoteDefTail /\]/ contained containedin=pandocFootnoteDef' , ' conceal' )
396396
@@ -408,15 +408,15 @@ syn match pandocUListItem /^>\=\s*[*+-]\s\+-\@!.*$/ nextgroup=pandocUListItem,pa
408408call s: WithConceal (' list' , ' syn match pandocUListItemBullet /^>\=\s*\zs[*+-]/ contained containedin=pandocUListItem' , ' conceal cchar=' .s: cchars [' li' ])
409409
410410" Ordered lists
411- syn match pandocListItem / ^\s *(\?\(\d\+\|\l\|\#\| @\) [.)].*$/ nextgroup =pandocListItem,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocDelimitedCodeBlock,pandocListItemContinuation contains =@Spell,pandocEmphasis,pandocStrong,pandocNoFormatted,pandocStrikeout,pandocSubscript,pandocSuperscript,pandocStrongEmphasis,pandocStrongEmphasis,pandocPCite,pandocICite,pandocCiteKey,pandocReferenceLabel,pandocLaTeXCommand,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocAutomaticLink skipempty display
411+ syn match pandocListItem / ^\s *(\?\(\d\+\|\l\|\#\| @\) [.)].*$/ nextgroup =pandocListItem,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocDelimitedCodeBlock,pandocListItemContinuation contains =@Spell,pandocEmphasis,pandocStrong,pandocNoFormatted,pandocStrikeout,pandocSubscript,pandocSuperscript,pandocStrongEmphasis,pandocStrongEmphasis,pandocPCite,pandocICite,pandocCiteKey,pandocReferenceLabel,pandocLaTeXCommand,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocAutomaticLink skipempty display
412412" support for roman numerals up to 'c'
413413if g: pandoc #syntax #roman_lists != 0
414- syn match pandocListItem / ^\s *(\? x\= l\=\( i\{ ,3}[vx]\=\)\{ ,3}c\{ ,3}[.)].*$/ nextgroup =pandocListItem,pandocMathBlock,pandocLaTeXInlineMath,pandocDelimitedCodeBlock,pandocListItemContinuation,pandocAutomaticLink skipempty display
414+ syn match pandocListItem / ^\s *(\? x\= l\=\( i\{ ,3}[vx]\=\)\{ ,3}c\{ ,3}[.)].*$/ nextgroup =pandocListItem,pandocMathBlock,pandocLaTeXInlineMath,pandocDelimitedCodeBlock,pandocListItemContinuation,pandocAutomaticLink skipempty display
415415endif
416416syn match pandocListItemBullet / ^(\? .\{ -}[.)]/ contained containedin =pandocListItem
417417syn match pandocListItemBulletId / \(\d\+\|\l\|\#\| @.\{ -}\| x\= l\=\( i\{ ,3}[vx]\=\)\{ ,3}c\{ ,3}\) / contained containedin =pandocListItemBullet
418418
419- syn match pandocListItemContinuation / ^\s\+\( [-+*]\s\+\| (\? .\+ [).]\)\@ <!\( [[:alpha:]ñäëïöüáéíóúàèìòùłßÄËÏÖÜÁÉÍÓÚÀÈÌÒÙŁß_"[]\|\*\S\)\@ =.*$/ nextgroup=pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocDelimitedCodeBlock,pandocListItemContinuation,pandocListItem contains=@Spell,pandocEmphasis,pandocStrong,pandocNoFormatted,pandocStrikeout,pandocSubscript,pandocSuperscript,pandocStrongEmphasis,pandocStrongEmphasis,pandocPCite,pandocICite,pandocCiteKey,pandocReferenceLabel,pandocReferenceURL,pandocLaTeXCommand,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocAutomaticLink contained skipempty display
419+ syn match pandocListItemContinuation / ^\s\+\( [-+*]\s\+\| (\? .\+ [).]\)\@ <!\( [[:alpha:]ñäëïöüáéíóúàèìòùłßÄËÏÖÜÁÉÍÓÚÀÈÌÒÙŁß_"[]\|\*\S\)\@ =.*$/ nextgroup=pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocDelimitedCodeBlock,pandocListItemContinuation,pandocListItem contains=@Spell,pandocEmphasis,pandocStrong,pandocNoFormatted,pandocStrikeout,pandocSubscript,pandocSuperscript,pandocStrongEmphasis,pandocStrongEmphasis,pandocPCite,pandocICite,pandocCiteKey,pandocReferenceLabel,pandocReferenceURL,pandocLaTeXCommand,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocAutomaticLink contained skipempty display
420420" }}}
421421" Definitions: {{{2
422422"
0 commit comments