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

Fix endline characters #151

Closed
wants to merge 1 commit into from

Conversation

GravisZro
Copy link
Contributor

Replace \r\n with \n.

#!/bin/sh
for filename in $(find)
do
  encoding=$(file -b --mime-encoding $filename)
  if [ "$encoding" = "us-ascii" ] ||
     [ "$encoding" = "iso-8859-1" ]; then
    echo fixing ${filename}
    sed 's/\r$//' ${filename} > ${filename}.lf
    mv ${filename}.lf ${filename}
done

Fixes #129

Replace \r\n with \n.
```
for filename in $(find)
do
  encoding=$(file -b --mime-encoding $filename)
  if [ "$encoding" = "us-ascii" ] ||
     [ "$encoding" = "iso-8859-1" ]; then
    echo fixing ${filename}
    sed 's/\r$//' ${filename} > ${filename}.lf
    mv ${filename}.lf ${filename}
done
```
@GravisZro GravisZro changed the title Endline fixes Fix endline characters Apr 22, 2024
@GravisZro
Copy link
Contributor Author

The file encodings are not altered by this patch.

@Lgt2x
Copy link
Collaborator

Lgt2x commented Apr 23, 2024

Needs Windows testing to make sure levels are generated properly without CRLF

@Lgt2x Lgt2x added the needs testing Needs testing to confirm issue or resolution label Apr 23, 2024
@GravisZro
Copy link
Contributor Author

@Lgt2x By properly generated do you mean the game or the editor?

@Lgt2x
Copy link
Collaborator

Lgt2x commented Apr 23, 2024

the game when creating the HOGs

@JeodC
Copy link
Member

JeodC commented Apr 24, 2024

I just played through Level 5 with this build, I think it's fine.

@GravisZro GravisZro closed this Apr 24, 2024
@GravisZro GravisZro deleted the fix/endlines branch April 24, 2024 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs testing Needs testing to confirm issue or resolution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent line endings
3 participants