rojo-rbx / rojo

Rojo enables Roblox developers to use professional-grade software engineering tools
https://rojo.space
Mozilla Public License 2.0
908 stars 172 forks source link

Normalize line endings to LF in Lua middleware #854

Closed kennethloeffler closed 4 months ago

kennethloeffler commented 5 months ago

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 commented 5 months ago

... 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...