-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
A few weird cases I'm running into; I want to preserve comments in my file but am uncovering some bugs:
case 1
> echo -e 'if dev then --cool\n end' | shrinko8 - - -f lua -m --no-minify-comments --no-minify-spaces --const dev trueexpected output: --cool
actual output: (nothing)
> echo '--cool' | shrinko8 - - -f lua -m --no-minify-comments --no-minify-spacesexpected output: --cool
actual output: (nothing)
case 2
test2.lua:
--[[something]]
if dev then
-- true
a=1
else
-- false
a=0
end> shrinko8 test2.lua out.lua -m --no-minify-comments --no-minify-spaces --const dev trueIn this case, the --true/--false comments are removed completely for some reason. But weirdly, this only happens when the --[[something]] comment exists -- remove it and the behavior is fine
case 3
test3.lua:
if dev then
-- true
a=1
else
-- false
a=0
end> shrinko8 --minify --no-minify-spaces --no-minify-comments test3.lua - -f lua
if (n) e=1 else e=0(expected output: comments should not be removed)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels