lua-minify
lua-minify copied to clipboard
Allow for numeric escape sequences
Lua strings accept numerical escapes as a "\ddd" sequence, where ddd is 1-3 decimal digits (see Lua Manual, "Lexical Conventions").
This patch makes the parser tolerate escape sequences starting with a digit, copying them to the output as-is. Note that they're not validated in this case.
This (partly) fixes #4.
Lua 5.2+ also recognizes \xXX, where XX is a sequence of exactly two hexadecimal digits. This isn't addressed by this PR, and would have to be treated separately.
Regards, NiteHawk