Implement loading lua from separate files via @

This commit is contained in:
2025-12-19 14:07:39 +01:00
parent 2fa99ec3a2
commit 98e05f4998
9 changed files with 514 additions and 22 deletions

View File

@@ -59,7 +59,7 @@ func ProcessRegex(content string, command utils.ModifyCommand, filename string)
// More important is that we don't fuck up the command
// But we shouldn't be able to since it's passed by value
previousLuaExpr := command.Lua
luaExpr := BuildLuaScript(command.Lua)
luaExpr := BuildLuaScript(command.Lua, command.SourceDir)
processRegexLogger.Debug("Transformed Lua expression: %q → %q", previousLuaExpr, luaExpr)
processRegexLogger.Trace("Full Lua script: %q", utils.LimitString(luaExpr, 200))