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

Handle lone-carriage-return line endings #1493

Merged
merged 8 commits into from
Nov 3, 2023

Conversation

wixoaGit
Copy link
Member

@wixoaGit wixoaGit commented Oct 15, 2023

Lines ending with just \r are treated as newlines.
Multiple consecutive \r characters are also handled now.

Also some general cleanup in the preprocessor, especially in the lexer which no longer inherits TextLexer

Fixes #1492

@Cyberboss
Copy link
Contributor

Note the problem was lines actually being

ghjkjfdslg\r\n
asdf\r\r\n
fdsa\r\r\n
ghjkjfdslg\r\n

Not sure if this is BYOND-like behaviour

@Cyberboss
Copy link
Contributor

Related #1492

Rather than read & allocate all the text in every file
A line comment directly before the EOF could end up in an infinite loop
Switched from ASCII to UTF8 encoding
@wixoaGit wixoaGit merged commit 6570a8c into OpenDreamProject:master Nov 3, 2023
4 checks passed
@wixoaGit wixoaGit deleted the lone_carriage_return branch November 3, 2023 18:26
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.

Mixed line endings error in OD
2 participants