Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Require \r whitespace to be followed by \n" #399

Merged
merged 2 commits into from Jul 9, 2023
Merged

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Jul 9, 2023

Revert #393. It turns out bare \r is only prohibited inside of literals. In between tokens, bare \r is allowed and equivalent to \n.

The schemafy_core crate contains some bare \r. 😞

$ hexyl schemafy_core-0.6.0/src/lib.rs 
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚00000000β”‚ 70 75 62 20 6d 6f 64 20 β”Š 6f 6e 65 5f 6f 72 5f 6d β”‚pub mod β”Šone_or_mβ”‚
β”‚00000010β”‚ 61 6e 79 3b 0d 0d 0a    β”Š                         β”‚any;___ β”Š        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Notice the file ends with \r\r\n.

@dtolnay dtolnay merged commit 9c812bc into master Jul 9, 2023
20 checks passed
@dtolnay dtolnay deleted the carriagereturn branch July 9, 2023 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant