huderlem / poryscript

High-level scripting language for gen 3 pokemon decompilation projects
https://www.huderlem.com/poryscript-playground/
MIT License
191 stars 21 forks source link

Format breaks when compiling multiline strings on Windows #66

Open Mawootad opened 2 months ago

Mawootad commented 2 months ago

On Windows, when compiling formatted strings, eg:

format("This is a string
that is on multiple lines")

The resulting compiled string may end up with invalid line breaks in it, eg:

.string "This is a string
that"
.string "is on multiple lines"

This is using the 3.3 Linux Poryscript running a make script through WSL2. The issue seems to happen regardless of using CRLF or just LF endings as performed via git config core.eol lf and git add --update --renormalize.

ForwardFeed commented 2 months ago

However on my Ubuntu 22.10 this does not happens.

text MultilineStringOnLinux{
    format("This is a string
that is on multiple lines")
}

Gets transformed

MultilineStringOnLinux::
# 810 "data/maps/DewfordTown_Gym/scripts.pory"
    .string "This is a string that is on multiple\n"
    .string "lines$"

with poryscript 3.3.0