@@ -24,18 +24,22 @@ syn match aptDateStop /^\s\+----*/ contained
24
24
" section title matches subsections as well, which start with one to four stars
25
25
syn match aptSectionTitle / ^\(\*\{ 1,4}\s *\)\? [a-zA-Z0-9{].*/ contains =aptAnchor
26
26
27
- syn region aptVerbatimText matchgroup =aptVerbatim start =" ^[+-]---*+\? " end =" ^[+-]---*+\? " keepend
27
+ syn region aptVerbatimText matchgroup =aptVerbatim start =" ^[+-]---*+\? " end =" ^[+-]---*+\? "
28
28
29
- syn region aptFigure start =" ^\[ " end =" ]" oneline keepend
30
- syn match aptFigureCaption / \( ^ \[ .* \]\)\@ <=.* /
29
+ syn region aptFigure start =" ^\[ " end =" ]" oneline nextgroup = aptFigureCaption
30
+ syn match aptFigureCaption / .* / contained
31
31
32
- syn match aptTableRowSep / ^\* --[*+:-]*/ nextgroup =aptTableCaption,aptTableCells skipnl
33
- syn match aptTableCells / ^\( |\|\s\) .*/ contained contains =aptTableCellSep nextgroup =aptTableCells,aptTableRowSep skipnl
34
- syn match aptTableCellSep / \\\@ <!|/ contained
35
- syn match aptTableCaption / ^\w .*/ contained
32
+ syn match aptTableRowSep / ^\* --[*+:-]*/ nextgroup =aptTableCaption,aptTableCells skipnl
33
+ syn match aptTableCells / ^\( |\|\s\) .*/ contained contains =aptPipeSep nextgroup =aptTableCells,aptTableRowSep skipnl
34
+ syn match aptPipeSep / \\\@ <!|/ contained
35
+ syn match aptTableCaption / ^\w .*/ contained
36
+
37
+ syn region aptMacroContents matchgroup =aptMacro start =" ^%{" end =" }" oneline contains =aptPipeSep,aptAssign,aptMacroUrl
38
+ syn match aptAssign / =/ contained
39
+ syn match aptMacroUrl / \(\( src\| url\| file\) =\)\@ <=[^|}]*/ contained
36
40
37
41
syn match aptHorRule / ^====*$/
38
- syn match aptComment / \~\~ .*$/ containedin =ALL contains =NONE
42
+ syn match aptComment / \~\~ .*$/ containedin =ALL contains =NONE
39
43
40
44
" not matching page breaks, since the C-L is already highlighted by VIM
41
45
syn match aptLineBreak / \\ $/
@@ -51,14 +55,12 @@ syn region aptMonospace start="<<<" end=">>>" oneline
51
55
52
56
syn region aptAnchor start =" {" end =" }" oneline
53
57
syn region aptLink start =" {{" end =" }}" oneline
54
- syn region aptAnchor matchgroup =aptAnchor start =" {{\( { \) \@ =" end =" }}" oneline contains =aptInnerLink
58
+ syn region aptAnchor matchgroup =aptAnchor start =" {{{ \@ =" end =" }}" oneline contains =aptInnerLink
55
59
syn region aptInnerLink contained start =" {" end =" }"
56
60
57
61
syn match aptBulletList / ^\s\+\* /
58
- syn region aptDefList matchgroup =aptDefList start =" \s\[ " end =" ]" oneline keepend contains =aptDefIndex
59
- syn match aptDefIndex / [^\] ]*/ contained
60
- syn region aptNumList matchgroup =aptNumList start =" \s\[\[ " end =" ]]" oneline keepend contains =aptListIndex
61
- syn match aptListIndex / \w\+ / contained
62
+ syn region aptDefIndex matchgroup =aptDefList start =" \s\[ " end =" ]" oneline
63
+ syn region aptListIndex matchgroup =aptNumList start =" \s\[\[ " end =" ]]" oneline
62
64
63
65
64
66
" Default highlighting
@@ -88,9 +90,14 @@ if version >= 508 || !exists("did_doxiaapt_syntax_inits")
88
90
89
91
HiLink aptTableRowSep PreProc
90
92
HiLink aptTableCells Constant
91
- HiLink aptTableCellSep PreProc
93
+ HiLink aptPipeSep PreProc
92
94
HiLink aptTableCaption Identifier
93
95
96
+ HiLink aptMacro Macro
97
+ HiLink aptMacroContents Constant
98
+ HiLink aptMacroUrl Underlined
99
+ HiLink aptAssign Operator
100
+
94
101
HiLink aptHorRule PreProc
95
102
HiLink aptComment Comment
96
103
0 commit comments