diff --git a/lib/rouge/lexers/rust.rb b/lib/rouge/lexers/rust.rb index 4f0aa8ffef..d11659242b 100644 --- a/lib/rouge/lexers/rust.rb +++ b/lib/rouge/lexers/rust.rb @@ -253,6 +253,7 @@ def macro_closed? state :string do rule %r/"/, Str, :pop! rule escapes, Str::Escape + rule %r/\\\n[ \t\r\n]*/, Str::Escape rule %r/[^"\\]+/m, Str end end diff --git a/spec/visual/samples/rust b/spec/visual/samples/rust index 78d5d6b035..d046cce07f 100644 --- a/spec/visual/samples/rust +++ b/spec/visual/samples/rust @@ -38,6 +38,9 @@ println!(r###"r##"r#""#"##"###); println!(r#" "New line in a raw string" "#); +println!("String continuation\ + + escape"); trait Iterable { fn iterate(&self, blk: impl FnMut(&A) -> bool);