Release 1.2.2

This commit is contained in:
omltcat
2024-06-06 09:24:59 -04:00
parent f115427f63
commit 4e6054533b
3 changed files with 12 additions and 3 deletions

View File

@@ -65,7 +65,8 @@ async function runLua(lua: string, outputChannel: vscode.OutputChannel, filename
// Replace JSON syntax with Lua syntax
luaString = luaString.replace(/null/g, 'nil'); // Replace null with nil
luaString = luaString.replace(/"((?:[^"\\]|\\.)+)":/g, '["$1"] ='); // Replace "key": with ["key"] =
luaString = luaString.replace(/\["_([0-9]+)"\]\s*=/g, '[$1] ='); // Replace ["_n"] = with [n] =
luaString = luaString.replace(/\["_([0-9.]+)"\]\s*=/g, '[$1] ='); // Replace ["_n"] or ["_n.m"] = with [n] or [n.m] =
luaString = luaString.replace(/\["([0-9.]+)"\]\s*=/g, '[$1] ='); // Replace ["n"] or ["n.m"] = with [n] or [n.m] =
luaString = luaString.replace(/\[\]/g, '{}'); // Replace [] with {}
luaString = luaString.replace(/\[\n/g, '{\n'); // Replace [ followed by a line break with { followed by a line break
luaString = luaString.replace(/]\n/g, '}\n'); // Replace ] followed by a line break with } followed by a line break