commit
84702bc289
3 changed files with 33 additions and 0 deletions
|
|
@ -1321,6 +1321,11 @@ impl<'a> Iterator for LineClasses<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
// Workaround for CRLF newline.
|
||||
if line.ends_with('\r') {
|
||||
line.pop();
|
||||
}
|
||||
|
||||
Some((self.kind, line))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
14
tests/source/issue-3265.rs
Normal file
14
tests/source/issue-3265.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// rustfmt-newline_style: Windows
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
summary_test! {
|
||||
tokenize_recipe_interpolation_eol,
|
||||
"foo: # some comment
|
||||
{{hello}}
|
||||
",
|
||||
"foo: \
|
||||
{{hello}} \
|
||||
{{ahah}}",
|
||||
"N:#$>^{N}$<.",
|
||||
}
|
||||
}
|
||||
14
tests/target/issue-3265.rs
Normal file
14
tests/target/issue-3265.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
// rustfmt-newline_style: Windows
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
summary_test! {
|
||||
tokenize_recipe_interpolation_eol,
|
||||
"foo: # some comment
|
||||
{{hello}}
|
||||
",
|
||||
"foo: \
|
||||
{{hello}} \
|
||||
{{ahah}}",
|
||||
"N:#$>^{N}$<.",
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue