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

Make end-of-line recognition more robust #6395

Open
Goober5000 opened this issue Oct 14, 2024 · 0 comments
Open

Make end-of-line recognition more robust #6395

Goober5000 opened this issue Oct 14, 2024 · 0 comments
Labels
bug An issue from unintended consequences good first issue An issue thats "easy" to do and is recommended for beginning contributors
Milestone

Comments

@Goober5000
Copy link
Contributor

The newline processing in the FSO parser could be improved. As seen in parse_get_line(), FSO simply ignores any carriage returns it finds (\r, character 13) and only processes a newline when it encounters a line feed (\n, character 10). But if a carriage return is not immediately followed by a line feed, two lines can be unexpectedly concatenated. The combination of this plus a semicolon caused the mysterious behavior seen in #6389.

Better behavior would be to move to a newline on a \r or \n or \r\n and to display a warning if the newline styles are mixed within the same file.

@Goober5000 Goober5000 added bug An issue from unintended consequences good first issue An issue thats "easy" to do and is recommended for beginning contributors labels Oct 14, 2024
@Goober5000 Goober5000 added this to the Release 25.0 milestone Oct 14, 2024
@github-project-automation github-project-automation bot moved this to Needs triage in Bug Triage Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue from unintended consequences good first issue An issue thats "easy" to do and is recommended for beginning contributors
Projects
Status: Needs triage
Status: To Sort
Development

No branches or pull requests

1 participant