pico8-ls icon indicating copy to clipboard operation
pico8-ls copied to clipboard

Formatting inserts a space above header comments that breaks pico-8 cart label

Open schoblaska opened this issue 1 year ago • 2 comments

When the top of my file looks like this:

pico-8 cartridge // http://www.pico-8.com
version 41
__lua__
-- sokotiles
-- by schoblaska

The cart label gets generated like this:

image

But if I have pico8-ls format the file, it inserts an empty line like this:

pico-8 cartridge // http://www.pico-8.com
version 41
__lua__

-- sokotiles
-- by schoblaska

and now the cart label only includes the first comment:

image

schoblaska avatar Dec 23 '23 01:12 schoblaska

Does the formatter insert the space at the top of the file?

japhib avatar Dec 23 '23 01:12 japhib

I believe so, yes. In my editor, the empty line is only inserted when the pic8-ls extension is enabled.

schoblaska avatar Dec 23 '23 02:12 schoblaska

Faced the same issue. Simple workaround is just removing it and running > File: Save without Formatting before exporting the .p8.png. But would be nice with a patch.

akd-io avatar Oct 26 '24 09:10 akd-io

Added #65 to try to resolve the issue

akd-io avatar Oct 26 '24 09:10 akd-io