You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a file contains only comments (use case: ldoc API definitions), the formatter crashes:
printf -- '-- this is just a comment\n-- more comments\n' | luaformatter /dev/stdin
/usr/bin/lua5.1: ...ome/julien/.luaenv/check/share/lua/5.1/formatter.lua:57: attempt to index local 'node' (a nil value)
stack traceback:
...ome/julien/.luaenv/check/share/lua/5.1/formatter.lua:57: in function 'getlastline'
...ome/julien/.luaenv/check/share/lua/5.1/formatter.lua:373: in function 'getindentlevel'
...ome/julien/.luaenv/check/share/lua/5.1/formatter.lua:512: in function 'indentcode'
...uarocks/rocks-5.1/formatter/0.1.1-1/bin/luaformatter:79: in main chunk
[C]: ?
Interestingly, the issue doesn't exist with a single line.
The text was updated successfully, but these errors were encountered:
When a file contains only comments (use case: ldoc API definitions), the formatter crashes:
Interestingly, the issue doesn't exist with a single line.
The text was updated successfully, but these errors were encountered: