lib/rouge/lexers/rust.rb in rouge-3.15.0 vs lib/rouge/lexers/rust.rb in rouge-3.16.0
- old
+ new
@@ -157,10 +157,11 @@
rule %r(
' (?: #{escapes} | [^\\] ) '
)x, Str::Char
rule %r/"/, Str, :string
+ rule %r/r(#*)".*?"\1/m, Str
# numbers
dot = /[.][0-9_]+/
exp = /e[-+]?[0-9_]+/
flt = /f32|f64/
@@ -183,19 +184,10 @@
end
state :string do
rule %r/"/, Str, :pop!
rule escapes, Str::Escape
- rule %r/%%/, Str::Interpol
- rule %r(
- %
- ( [0-9]+ [$] )? # Parameter
- [0#+-]* # Flag
- ( [0-9]+ [$]? )? # Width
- ( [.] [0-9]+ )? # Precision
- [bcdfiostuxX?] # Type
- )x, Str::Interpol
- rule %r/[^%"\\]+/m, Str
+ rule %r/[^"\\]+/m, Str
end
end
end
end