@@ -8,8 +8,9 @@ scriptencoding utf-8
8
8
" Maintainer: Caleb Maclennan <[email protected] >
9
9
" Contributor: David Sanson <[email protected] >
10
10
" Contributor: Jorge Israel Peña <[email protected] >
11
+ " Contributor: Rob Muhlestein (twitch.tv/rwxrob) <[email protected] >
11
12
" OriginalAuthor: Jeremy Schultz <[email protected] >
12
- " Version: 5.0
13
+ " Version: 5.1
13
14
14
15
" Configuration: {{{1
15
16
"
@@ -223,6 +224,14 @@ endif
223
224
224
225
" Syntax Rules: {{{1
225
226
227
+ " corrects distracting conceal (ligature) background colors, blue makes
228
+ " it obvious that the character is a ligature instead of an actual Unicode
229
+ " character since both can exist in the same file
230
+ hi Conceal ctermbg= none ctermfg= Blue
231
+
232
+ " preferable link color to underlining
233
+ hi link pandocDelimitedCodeBlock pandocNoFormatted
234
+
226
235
" Embeds: {{{2
227
236
228
237
" HTML: {{{3
@@ -368,11 +377,11 @@ call s:WithConceal('strikeout', 'syn match pandocStrikeoutMark /\~\~/ contained
368
377
" }}}2
369
378
370
379
" Headers: {{{2
371
- syn match pandocAtxHeader / \(\% ^\| <.\+ >.*\n\| ^\s *\n\)\@ <=#\{ 1,6}.*\n / contains =pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,pandocEscapedDollar,@Spell,pandocAmpersandEscape,pandocReferenceLabel,pandocReferenceURL display
380
+ syn match pandocAtxHeader / \(\% ^\| <.\+ >.*\n\| ^\s *\n\)\@ <=#\{ 1,6}.*\n / contains =pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,pandocEscapedDollar,pandocBeginQuote,pandocEndQuote,pandocBeginSQuote,pandocEndSQuote,pandocApostrophe,pandocEllipses, @Spell,pandocAmpersandEscape,pandocReferenceLabel,pandocReferenceURL display
372
381
syn match pandocAtxHeaderMark / \( ^#\{ 1,6}\|\\\@ <!#\+\(\s *.*$\)\@ =\) / contained containedin =pandocAtxHeader
373
382
call s: WithConceal (' atx' , ' syn match pandocAtxStart /#/ contained containedin=pandocAtxHeaderMark' , ' conceal cchar=' .s: cchars [' atx' ])
374
- syn match pandocSetexHeader / ^.\+\n [=]\+ $/ contains =pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,pandocEscapedDollar,@Spell,pandocAmpersandEscape
375
- syn match pandocSetexHeader / ^.\+\n [-]\+ $/ contains =pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,pandocEscapedDollar,@Spell,pandocAmpersandEscape
383
+ syn match pandocSetexHeader / ^.\+\n [=]\+ $/ contains =pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,pandocEscapedDollar,pandocBeginQuote,pandocEndQuote,pandocBeginSQuote,pandocEndSQuote,pandocApostrophe,pandocEllipses, @Spell,pandocAmpersandEscape
384
+ syn match pandocSetexHeader / ^.\+\n [-]\+ $/ contains =pandocEmphasis,pandocStrong,pandocNoFormatted,pandocLaTeXInlineMath,pandocEscapedDollar,pandocBeginQuote,pandocEndQuote,pandocBeginSQuote,pandocEndSQuote,pandocApostrophe,pandocEllipses, @Spell,pandocAmpersandEscape
376
385
syn match pandocHeaderAttr / {.*}/ contained containedin =pandocAtxHeader,pandocSetexHeader
377
386
syn match pandocHeaderID / #[-_:.[:lower:][:upper:]]*/ contained containedin =pandocHeaderAttr
378
387
" }}}2
@@ -452,12 +461,12 @@ call s:WithConceal('abbrev', 'syn match pandocAbbreviationTail /\]/ contained co
452
461
syn match pandocFootnoteID / \[\^ [^\] ]\+\] / nextgroup =pandocFootnoteDef
453
462
454
463
" Inline footnotes
455
- syn region pandocFootnoteDef start =/ \^\[ / skip =/ \[ .\{ -}]/ end =/ \] / contains =pandocReferenceLabel,pandocReferenceURL,pandocLatex,pandocPCite,pandocCiteKey,pandocStrong,pandocEmphasis,pandocStrongEmphasis,pandocNoFormatted,pandocSuperscript,pandocSubscript,pandocStrikeout,pandocEnDash,pandocEmDash,pandocEllipses,pandocBeginQuote,pandocEndQuote,@Spell,pandocAmpersandEscape skipnl keepend
464
+ syn region pandocFootnoteDef start =/ \^\[ / skip =/ \[ .\{ -}]/ end =/ \] / contains =pandocReferenceLabel,pandocReferenceURL,pandocLatex,pandocPCite,pandocCiteKey,pandocStrong,pandocEmphasis,pandocStrongEmphasis,pandocNoFormatted,pandocSuperscript,pandocSubscript,pandocStrikeout,pandocEnDash,pandocEmDash,pandocEllipses,pandocBeginQuote,pandocEndQuote,pandocBeginSQuote,pandocEndSQuote,pandocApostrophe, @Spell,pandocAmpersandEscape skipnl keepend
456
465
call s: WithConceal (' footnote' , ' syn match pandocFootnoteDefHead /\^\[/ contained containedin=pandocFootnoteDef' , ' conceal cchar=' .s: cchars [' footnote' ])
457
466
call s: WithConceal (' footnote' , ' syn match pandocFootnoteDefTail /\]/ contained containedin=pandocFootnoteDef' , ' conceal' )
458
467
459
468
" regular footnotes
460
- syn region pandocFootnoteBlock start =/ \[\^ .\{ -}\] :\s *\n */ end =/ ^\n ^\s\@ !/ contains =pandocReferenceLabel,pandocReferenceURL,pandocLatex,pandocPCite,pandocCiteKey,pandocStrong,pandocEmphasis,pandocNoFormatted,pandocSuperscript,pandocSubscript,pandocStrikeout,pandocEnDash,pandocEmDash,pandocNewLine,pandocStrongEmphasis,pandocEllipses,pandocBeginQuote,pandocEndQuote,pandocLaTeXInlineMath,pandocEscapedDollar,pandocLaTeXCommand,pandocLaTeXMathBlock,pandocLaTeXRegion,pandocAmpersandEscape,@Spell skipnl
469
+ syn region pandocFootnoteBlock start =/ \[\^ .\{ -}\] :\s *\n */ end =/ ^\n ^\s\@ !/ contains =pandocReferenceLabel,pandocReferenceURL,pandocLatex,pandocPCite,pandocCiteKey,pandocStrong,pandocEmphasis,pandocNoFormatted,pandocSuperscript,pandocSubscript,pandocStrikeout,pandocEnDash,pandocEmDash,pandocNewLine,pandocStrongEmphasis,pandocEllipses,pandocBeginQuote,pandocEndQuote,pandocBeginSQuote,pandocEndSQuote,pandocApostophe, pandocLaTeXInlineMath,pandocEscapedDollar,pandocLaTeXCommand,pandocLaTeXMathBlock,pandocLaTeXRegion,pandocAmpersandEscape,@Spell skipnl
461
470
syn match pandocFootnoteBlockSeparator / :/ contained containedin =pandocFootnoteBlock
462
471
syn match pandocFootnoteID / \[\^ .\{ -}\] / contained containedin =pandocFootnoteBlock
463
472
call s: WithConceal (' footnote' , ' syn match pandocFootnoteIDHead /\[\^/ contained containedin=pandocFootnoteID' , ' conceal cchar=' .s: cchars [' footnote' ])
@@ -522,6 +531,19 @@ if &encoding ==# 'utf-8'
522
531
call s: WithConceal (' quotes' , ' syn match pandocEndQuote /\(\>[[:punct:]]*\)\@<="[[:blank:][:punct:]\n]\@=/ containedin=pandocEmphasis,pandocStrong,pandocUListItem,pandocListItem,pandocListItemContinuation display' , ' conceal cchar=”' )
523
532
endif
524
533
" }}}3
534
+ "
535
+ " Apostrophes: {{{3
536
+ if &encoding == # ' utf-8'
537
+ call s: WithConceal (' apostrophes' , ' syn match pandocApostrophe /[*~_\n[:space:]]\@<!'' / containedin=pandocEmphasis,pandocStrong,pandocUListItem,pandocListItem,pandocListItemContinuation display' , ' conceal cchar=’' )
538
+ endif
539
+ " }}}3
540
+
541
+ " Single Quotes: {{{3
542
+ if &encoding == # ' utf-8'
543
+ call s: WithConceal (' squotes' , ' syn match pandocBeginSQuote /[_*\n[:space:]]\@<='' \</ containedin=pandocEmphasis,pandocStrong,pandocListItem,pandocListItemContinuation,pandocUListItem display' , ' conceal cchar=‘' )
544
+ call s: WithConceal (' squotes' , ' syn match pandocEndSQuote /\(\>[[:punct:]]*\)\@<='' [[:blank:][:punct:]\n]\@=/ containedin=pandocEmphasis,pandocStrong,pandocUListItem,pandocListItem,pandocListItemContinuation display' , ' conceal cchar=’' )
545
+ endif
546
+ " }}}3
525
547
526
548
" Hrule: {{{3
527
549
syn match pandocHRule / ^\s *\( [*\- _]\)\s *\% (\1\s *\)\{ 2,}$/ display
0 commit comments