diff --git a/rc/filetype/rust.kak b/rc/filetype/rust.kak index 8a57ce9e..396557f7 100644 --- a/rc/filetype/rust.kak +++ b/rc/filetype/rust.kak @@ -39,7 +39,7 @@ add-highlighter shared/rust/line_doctest region ^\h*//[!/]\h*```($|should_panic| add-highlighter shared/rust/line_doctest/marker region ```.* $ group add-highlighter shared/rust/line_doctest/marker/fence regex ``` 0:meta add-highlighter shared/rust/line_doctest/marker/keywords regex [\d\w] 0:meta # already matched above, just ignore comma -add-highlighter shared/rust/line_doctest/inner region '^\h*//[!/]( #(?= )|)' ' ' group +add-highlighter shared/rust/line_doctest/inner region '^\h*//[!/]( #(?= )|)' '$| ' group add-highlighter shared/rust/line_doctest/inner/comment regex //[!/] 0:documentation add-highlighter shared/rust/line_doctest/inner/hidden regex '#' 0:meta add-highlighter shared/rust/line_doctest/code default-region ref rust diff --git a/test/highlight/rust/comment/in b/test/highlight/rust/comment/in index c4dd2113..65128cba 100644 --- a/test/highlight/rust/comment/in +++ b/test/highlight/rust/comment/in @@ -102,3 +102,16 @@ fn bar(s: &str) { * ``` */ + /// ``` + /// println!("empty line"); + /// + /// println!("continue line"); + /// ``` + + /** + * ``` + * println!("empty line"); + * + * println!("continue line"); + * ``` + */