-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
Description:
When trying to minify the following Lua code with luamin, I receive an error related to an "unfinished string":
print((function(a) return a end)("Hello, World!"))Command:
luamin -c 'print((function(a) return a end)("Hello, World!"))'Error:
[1:20] unfinished string near 'print((function(a)'
Error: failed to minify. Make sure the Lua code is valid.
If you think this is a bug in luamin, please report it:
https://github.com/mathiasbynens/luamin/issues/new
Stack trace using luamin@1.0.4 and luaparse@0.2.1:
SyntaxError: [1:20] unfinished string near 'print((function(a)'
at raise (C:\Users\xxx\AppData\Roaming\npm\node_modules\luamin\node_modules\luaparse\luaparse.js:466:15)
at scanStringLiteral (C:\Users\xxx\AppData\Roaming\npm\node_modules\luamin\node_modules\luaparse\luaparse.js:741:9)
at lex (C:\Users\xxx\AppData\Roaming\npm\node_modules\luamin\node_modules\luaparse\luaparse.js:573:16)
at end (C:\Users\xxx\AppData\Roaming\npm\node_modules\luamin\node_modules\luaparse\luaparse.js:2092:17)
at parse (C:\Users\xxx\AppData\Roaming\npm\node_modules\luamin\node_modules\luaparse\luaparse.js:2065:31)
at minify (C:\Users\xxx\AppData\Roaming\npm\node_modules\luamin\luamin.js:621:6)
at C:\Users\xxx\AppData\Roaming\npm\node_modules\luamin\bin\luamin:69:14
at Array.forEach (<anonymous>)
at main (C:\Users\xxx\AppData\Roaming\npm\node_modules\luamin\bin\luamin:55:12)
at C:\Users\xxx\AppData\Roaming\npm\node_modules\luamin\bin\luamin:99:3
Steps to Reproduce:
- Run the command:
luamin -c 'print((function(a) return a end)("Hello, World!"))' - Observe the error output.
Expected Behavior:
The Lua code should minify without errors, producing a valid minified output.
Actual Behavior:
The minifier throws an error about an "unfinished string" and fails to produce output.
Environment:
- luamin version: 1.0.4
- luaparse version: 0.2.1
- Operating System: Windows
You can copy-paste this issue into the luamin GitHub repository: https://github.com/mathiasbynens/luamin/issues/new.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels