From b50b1628840daf849e548c83372f85bc13092314 Mon Sep 17 00:00:00 2001 From: Corey Richardson Date: Sun, 24 Nov 2013 23:23:50 -0500 Subject: Be more strict about doc comments Previously, `//// foo` and `/*** foo ***/` were accepted as doc comments. This changes that, so that only `/// foo` and `/** foo ***/` are accepted. This confuses many newcomers and it seems weird. Also update the manual for these changes, and modernify the EBNF for comments. Closes #10638 --- src/etc/vim/syntax/rust.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/etc/vim/syntax/rust.vim') diff --git a/src/etc/vim/syntax/rust.vim b/src/etc/vim/syntax/rust.vim index e5ff089e2e1..dc1e58c1ae3 100644 --- a/src/etc/vim/syntax/rust.vim +++ b/src/etc/vim/syntax/rust.vim @@ -187,8 +187,8 @@ syn match rustCharacter /'\([^'\\]\|\\\([nrt0\\'"]\|x\x\{2}\|u\x\{4}\|U\x\{8 syn region rustCommentML start="/\*" end="\*/" contains=rustTodo syn region rustComment start="//" end="$" contains=rustTodo keepend -syn region rustCommentMLDoc start="/\*\%(!\|\*/\@!\)" end="\*/" contains=rustTodo -syn region rustCommentDoc start="//[/!]" end="$" contains=rustTodo keepend +syn region rustCommentMLDoc start="/\*\%(!\|\*[*/]\@!\)" end="\*/" contains=rustTodo +syn region rustCommentDoc start="//\%(//\@!\|!\)" end="$" contains=rustTodo keepend syn keyword rustTodo contained TODO FIXME XXX NB NOTE -- cgit 1.4.1-3-g733a5