Merge pull request #199 from ineol/raw_strings
Don't format raw strings
This commit is contained in:
commit
3c6f623385
@ -28,7 +28,7 @@ impl Rewrite for ast::Expr {
|
||||
match self.node {
|
||||
ast::Expr_::ExprLit(ref l) => {
|
||||
match l.node {
|
||||
ast::Lit_::LitStr(ref is, _) => {
|
||||
ast::Lit_::LitStr(ref is, ast::StrStyle::CookedStr) => {
|
||||
rewrite_string_lit(context, &is, l.span, width, offset)
|
||||
}
|
||||
_ => context.codemap.span_to_snippet(self.span).ok(),
|
||||
|
@ -17,5 +17,10 @@ fn main() -> &'static str {
|
||||
|
||||
let really_long_variable_name = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
|
||||
|
||||
let raw_string = r#"Do
|
||||
not
|
||||
remove
|
||||
formatting"#;
|
||||
|
||||
"stuff"
|
||||
}
|
||||
|
@ -19,5 +19,10 @@ fn main() -> &'static str {
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
|
||||
|
||||
let raw_string = r#"Do
|
||||
not
|
||||
remove
|
||||
formatting"#;
|
||||
|
||||
"stuff"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user