You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO: We rarely ever take advantage of this optimization on Windows right
// now. We always normalize on entry but we apply the requested line ending
// on exit (so on Windows we often infer CRLF on entry and normalize to
// LF, but apply CRLF on exit so `source` and `new` always have different
// line endings). We probably need to compare pre-normalized against
// post-formatted output?
//
// Ah, no, the right thing to do is for the cli to not care about normalizing
// line endings. This is mostly useful in the LSP for all the document manipulation
// we are going to do there. In the cli, we want to format a whole bunch of files
// so we really want this optimization, and since the formatter and parser can handle
// windows line endings just fine, we should not normalize here.
Will require normalize_string() in the formatter for multiline strings
rome/tools#1672 is the old rome PR that allows this to work right. What i missed before is that on the way out of the formatter the printer normalizes all line endings one final time to whatever LineEnding is set as. So it is impossible to get mixed line endings on the way out.
The text was updated successfully, but these errors were encountered:
air/crates/air/src/commands/format.rs
Lines 188 to 199 in 68554e4
Will require
normalize_string()
in the formatter for multiline stringsrome/tools#1672 is the old rome PR that allows this to work right. What i missed before is that on the way out of the formatter the printer normalizes all line endings one final time to whatever
LineEnding
is set as. So it is impossible to get mixed line endings on the way out.The text was updated successfully, but these errors were encountered: