ephread / inkgd

Implementation of inkle's Ink in pure GDScript for Godot, with editor support.
MIT License
305 stars 33 forks source link

Glue is trimming whitespaces in the end of line #32

Open bkmeneguello opened 3 years ago

bkmeneguello commented 3 years ago

Describe the bug Whitespaces before glue marks are being trimmed.

To Reproduce If I compile this ink:

Partial   <>
* line

It gives this (excerpt of) JSON:

"^Partial ",
"<>",
"\n",
[
    "ev",
    ...
    {
        "s": [
            "^line",
            ...
            null
        ]
    }
],
...

Notice there is a whitespace after "Partial ".

But when I load this with InkGD (latest from master) the whitespaces are trimmed.

Expected behavior The whitespaces should be kept to allow concatenation with text from the selected choice.

Ink files THe one above

Environment:

Additional context I think is something here

ephread commented 2 years ago

I suspect that's expected, because I see the same behaviour when running that code example through inklecate, but I may miss something. Can you confirm the behaviour is different between inklecate 1.0.0 and what's currently in main (which is compatible with Ink 1.0.0)?