japhib / pico8-ls

PICO-8 Language Server
MIT License
64 stars 8 forks source link

[Bug] Formatter breaks `repeat until` pattern #43

Closed scambier closed 9 months ago

scambier commented 1 year ago

To reproduce:

repeat
  local foo = "bar"
until true

Format the code, it's now transformed into

repeat
  local foo = "bar"until true

And it's more buggy with a comment:

repeat
  local foo = "bar"
  -- comment
until true

formats into

repeat
  local foo = "bar"until
  -- comment
  true
japhib commented 1 year ago

Thanks for the example! Should be a relatively straightforward fix

japhib commented 9 months ago

Fixed with 0.5.1