ruff/crates/ruff_python_formatter/src
Micha Reiser f9129e435a
Normalize '\r' in string literals to '\n'
<!--
Thank you for contributing to Ruff! To help us out with reviewing, please consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

This PR normalizes line endings inside of strings to `\n` as required by the printer.

<!-- What's the purpose of the change? What does it do, and why? -->

## Test Plan

I added a new test using `\r\n` and ran the ecosystem check. There are no remaining end of line panics. 


https://gist.github.com/MichaReiser/8f36b1391ca7b48475b3a4f592d74ff4

<!-- How was it tested? -->
2023-06-30 10:13:23 +02:00
..
comments Format StmtTry (#5222) 2023-06-28 10:02:15 +00:00
expression Normalize '\r' in string literals to '\n' 2023-06-30 10:13:23 +02:00
module Run rustfmt on nightly to clean up erroneous comments (#5106) 2023-06-15 00:19:05 +00:00
other format StmtTryStar (#5418) 2023-06-29 08:07:33 +02:00
pattern Use dedicated structs in comparable.rs (#5042) 2023-06-13 03:57:34 +00:00
snapshots Use insta::glob instead of fixture macro (#5364) 2023-06-26 08:46:18 +00:00
statement format StmtTryStar (#5418) 2023-06-29 08:07:33 +02:00
builders.rs Fix invalid printer IR error (#5422) 2023-06-29 08:09:13 +02:00
cli.rs Create PyFormatOptions 2023-06-26 14:02:17 +02:00
context.rs Create PyFormatOptions 2023-06-26 14:02:17 +02:00
generated.rs Upgrade RustPython (#5192) 2023-06-19 21:09:53 +00:00
lib.rs Create PyFormatOptions 2023-06-26 14:02:17 +02:00
main.rs Add a formatter CLI for debugging (#4809) 2023-06-05 07:33:33 +00:00
options.rs Prefer the configured quote style 2023-06-26 14:24:25 +02:00
prelude.rs Accept any Into<AnyNodeRef> as Comments arguments (#5205) 2023-06-20 16:49:21 +00:00
trivia.rs Format Attribute Expression (#5259) 2023-06-21 21:33:53 +00:00