Closed pdesaulniers closed 4 years ago
Yea there's an issue with brackets because of how the string is passed to tl.gen
where %input%
is replaced with whatever you type. so t.gen([[print([[hey]])]])
needs to be escaped?
I tried
const fengariInput = tl.replace('%input%', newValue.replace(/\[/g, '%[').replace(/\]/g, '%]'))
const out: LuaTableJs = fengari.load(fengariInput)()
But getting tl syntax errors.
If I type brackets
[ ]
into the editor, I get a JavaScript error in the inspector console: