@@ -124,6 +124,11 @@ if !exists("g:pandoc#syntax#newlines")
124
124
let g: pandoc #syntax #newlines = 1
125
125
endif
126
126
" }}}
127
+ " detect roman-numeral list items? {{{2
128
+ if ! exists (' g:pandoc#syntax#roman_lists' )
129
+ let g: pandoc #syntax #roman_lists = 0
130
+ endif
131
+ " }}}
127
132
" }}}1
128
133
129
134
" Functions: {{{1
244
249
syn region pandocReferenceURL matchgroup =Operator start =/ \]\@ 1<=(/ end =/ )/ keepend display
245
250
endif
246
251
" let's not consider "a [label] a" as a label, remove formatting - Note: breaks implicit links
247
- syn match pandocNoLabel / \]\@ 1<!\(\s\+ \| ^\)\[ [^\[\] ]\{ -}\]\(\s\+\| $\) [\[ (]\@ !/ contains =pandocPCite
252
+ syn match pandocNoLabel / \]\@ 1<!\(\s\{ ,3} \| ^\)\[ [^\[\] ]\{ -}\]\(\s\+\| $\) [\[ (]\@ !/ contains =pandocPCite
248
253
syn match pandocLinkTip / \s *".\{ -}"/ contained containedin =pandocReferenceURL contains =@Spell display
249
254
call s: WithConceal (" image" , ' syn match pandocImageIcon /!\[\@=/ display' , ' conceal cchar=' . s: cchars [" image" ])
250
255
" }}}
@@ -416,7 +421,9 @@ call s:WithConceal('list', 'syn match pandocUListItemBullet /^>\=\s*\zs[*+-]/ co
416
421
" Ordered lists
417
422
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,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocAutomaticLink skipempty display
418
423
" support for roman numerals up to 'c'
419
- syn match pandocListItem / ^\s *(\? x\= l\=\( i\{ ,3}[vx]\=\)\{ ,3}c\{ ,3}[.)].*$/ nextgroup =pandocListItem,pandocLaTeXMathBlock,pandocLaTeXInlineMath,pandocDelimitedCodeBlock,pandocListItemContinuation,pandocAutomaticLink skipempty display
424
+ if g: pandoc #syntax #roman_lists != 0
425
+ syn match pandocListItem / ^\s *(\? x\= l\=\( i\{ ,3}[vx]\=\)\{ ,3}c\{ ,3}[.)].*$/ nextgroup =pandocListItem,pandocMathBlock,pandocLaTeXInlineMath,pandocDelimitedCodeBlock,pandocListItemContinuation,pandocAutomaticLink skipempty display
426
+ endif
420
427
syn match pandocListItemBullet / ^(\? .\{ -}[.)]/ contained containedin =pandocListItem
421
428
syn match pandocListItemBulletId / \(\d\+\|\l\|\#\| @.\{ -}\| x\= l\=\( i\{ ,3}[vx]\=\)\{ ,3}c\{ ,3}\) / contained containedin =pandocListItemBullet
422
429
0 commit comments