parse_format: treat r" as a literal

This commit is contained in:
David Hewitt 2021-02-06 15:01:07 +00:00
parent 399b6452b5
commit 04a19b93c6
3 changed files with 14 additions and 3 deletions

View file

@ -730,7 +730,7 @@ fn find_skips_from_snippet(
str_style: Option<usize>,
) -> (Vec<usize>, bool) {
let snippet = match snippet {
Some(ref s) if s.starts_with('"') || s.starts_with("r#") => s,
Some(ref s) if s.starts_with('"') || s.starts_with("r\"") || s.starts_with("r#") => s,
_ => return (vec![], false),
};