@@ -163,11 +163,12 @@ syn region rustGenericLifetimeCandidate display start=/\%(<\|,\s*\)\@<='/ end=/[
163
163
syn match rustLifetime display " \'\% ([^[:cntrl:][:space:][:punct:][:digit:]]\| _\)\% ([^[:cntrl:][:punct:][:space:]]\| _\) *"
164
164
syn match rustCharacter / '\( [^'\\ ]\|\\\( .\| x\x\{ 2}\| u\x\{ 4}\| U\x\{ 8}\)\) '/ contains =rustSpecial,rustSpecialError
165
165
166
- syn cluster rustComment contains =rustCommentLine,rustCommentLineDoc,rustCommentBlock,rustCommentBlockDoc
167
- syn region rustCommentLine start =" //" end =" $" contains =rustTodo,@Spell
168
- syn region rustCommentLineDoc start =" //\% (//\@ !\| !\) " end =" $" contains =rustTodo,@Spell
169
- syn region rustCommentBlock matchgroup =rustCommentBlock start =" /\*\% (!\|\* [*/]\@ !\)\@ !" end =" \* /" contains =rustTodo,@rustComment,@Spell keepend extend
170
- syn region rustCommentBlockDoc matchgroup =rustCommentBlockDoc start =" /\*\% (!\|\* [*/]\@ !\) " end =" \* /" contains =rustTodo,@rustComment,@Spell keepend extend
166
+ syn region rustCommentLine start =" //" end =" $" contains =rustTodo,@Spell
167
+ syn region rustCommentLineDoc start =" //\% (//\@ !\| !\) " end =" $" contains =rustTodo,@Spell
168
+ syn region rustCommentBlock matchgroup =rustCommentBlock start =" /\*\% (!\|\* [*/]\@ !\)\@ !" end =" \* /" contains =rustTodo,rustCommentBlockNest,@Spell
169
+ syn region rustCommentBlockDoc matchgroup =rustCommentBlockDoc start =" /\*\% (!\|\* [*/]\@ !\) " end =" \* /" contains =rustTodo,rustCommentBlockDocNest,@Spell
170
+ syn region rustCommentBlockNest matchgroup =rustCommentBlock start =" /\* " end =" \* /" contains =rustTodo,rustCommentBlockNest,@Spell contained transparent
171
+ syn region rustCommentBlockDocNest matchgroup =rustCommentBlockDoc start =" /\* " end =" \* /" contains =rustTodo,rustCommentBlockDocNest,@Spell contained transparent
171
172
" FIXME: this is a really ugly and not fully correct implementation. Most
172
173
" importantly, a case like ``/* */*`` should have the final ``*`` not being in
173
174
" a comment, but in practice at present it leaves comments open two levels
0 commit comments