mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Quote the quoted comment
This commit is contained in:
parent
048f12d9f0
commit
036141663b
2 changed files with 2 additions and 2 deletions
|
@ -135,7 +135,7 @@ fn doc_comment_text(comment: &ast::Comment) -> SmolStr {
|
||||||
|
|
||||||
// Quote the string
|
// Quote the string
|
||||||
// Note that `tt::Literal` expect an escaped string
|
// Note that `tt::Literal` expect an escaped string
|
||||||
let text = format!("\"{}\"", text.escape_default());
|
let text = format!("{:?}", text.escape_default().to_string());
|
||||||
text.into()
|
text.into()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -888,7 +888,7 @@ fn test_meta_doc_comments() {
|
||||||
MultiLines Doc
|
MultiLines Doc
|
||||||
*/
|
*/
|
||||||
}"#,
|
}"#,
|
||||||
"# [doc = \" Single Line Doc 1\"] # [doc = \" \\n MultiLines Doc\\n \"] fn bar () {}",
|
"# [doc = \" Single Line Doc 1\"] # [doc = \" \\\\n MultiLines Doc\\\\n \"] fn bar () {}",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue