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

Normalize line endings to LF in Lua middleware #854

Conversation

kennethloeffler
Copy link
Member

@kennethloeffler kennethloeffler commented Feb 6, 2024

Closes #776 by implementing a new method Vfs::read_to_string_lf_normalized and changing the Lua middleware to use it.

I'm not really sure why the middlewares were calling to_owned on contents_str - could it have been a limitation of earlier rbx-dom versions?

@kennethloeffler
Copy link
Member Author

... is this breaking? :(

User code could theoretically be matching against only CRLF line endings currently (I'm mostly thinking about text files/StringValues - this is moot for scripts since Roblox now aggressively normalizes scripts to LF). I guess such code is busted regardless...

@kennethloeffler kennethloeffler changed the title Normalize line endings to LF in all textual middlewares Normalize line endings to LF in Lua middleware Feb 8, 2024
@Dekkonot Dekkonot merged commit cf25eb0 into rojo-rbx:master Feb 12, 2024
6 checks passed
@kennethloeffler kennethloeffler deleted the normalize-line-endings-in-textual-middlewares branch February 12, 2024 23:03
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.

Rojo should remove Carriage Returns when syncing on Windows
2 participants