]> git.lizzy.rs Git - rust.git/commitdiff
Only format code blocks in comments with rust syntax notation
authortopecongiro <seuchida@gmail.com>
Mon, 5 Mar 2018 10:30:08 +0000 (19:30 +0900)
committertopecongiro <seuchida@gmail.com>
Mon, 5 Mar 2018 10:30:08 +0000 (19:30 +0900)
src/comment.rs

index 8b148ccfc376ace2876d66af7e14bc4b0555c225..74a14511be858622903cfd7fa2e0e03ee066eab2 100644 (file)
@@ -395,7 +395,7 @@ fn rewrite_comment_inner(
 
             continue;
         } else {
-            inside_code_block = line.starts_with("```");
+            inside_code_block = line.starts_with("```rust");
 
             if result == opener {
                 let force_leading_whitespace = opener == "/* " && count_newlines(orig) == 0;