Skip to content

Commit ec3cfae

Browse files
committed
auto merge of #5807 : klutzy/rust/vim-inner-doc, r=brson
Follow-up of #5760: Add syntax highlight for `/*! doc */` or `//! doc`.
2 parents 92e265c + 7a1394d commit ec3cfae

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/etc/vim/syntax/rust.vim

+4-4
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ syn match rustFloat display "\<[0-9][0-9_]*\.[0-9_]\+\%([eE][+-]\=[0-9
110110
syn match rustLifetime display "\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*"
111111
syn match rustCharacter "'\([^'\\]\|\\\(['nrt\\\"]\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'"
112112

113-
syn region rustCommentDoc start="/\*\*" end="\*/"
114-
syn region rustCommentDoc start="///" skip="\\$" end="$" keepend
113+
syn region rustCommentDoc start="/\*[\*!]" end="\*/"
114+
syn region rustCommentDoc start="//[/!]" skip="\\$" end="$" keepend
115115
syn match rustComment "/\*\*/"
116-
syn region rustComment start="/\*\([^\*]\|$\)" end="\*/" contains=rustTodo
117-
syn region rustComment start="//\([^/]\|$\)" skip="\\$" end="$" contains=rustTodo keepend
116+
syn region rustComment start="/\*\([^\*!]\|$\)" end="\*/" contains=rustTodo
117+
syn region rustComment start="//\([^/!]\|$\)" skip="\\$" end="$" contains=rustTodo keepend
118118

119119
syn keyword rustTodo contained TODO FIXME XXX NB
120120

0 commit comments

Comments
 (0)