lua-resty-template
lua-resty-template copied to clipboard
Different output with precompiled Lua code
Let's say I have this code in template
// {# comment #}
console.log(name);
Which correctly compiles to
//
console.log(name);
But if I enable precompilation of Lua byte code (content_by_lua_file) it compiles to
// console.log(name);
As you can see bottom line pops up to comment line and this breaks JavaScript code.
As far as I know it happens if you have newline character after comment block without any other characters.
Precompilation: https://blog.openresty.com/en/luajit-bytecode/
@decadence, great feedback! that nice! let me see if I can do something about it.