Add more tests for modifycommand
This commit is contained in:
@@ -44,8 +44,8 @@ func ProcessRegex(content string, command utils.ModifyCommand) ([]utils.ReplaceC
|
||||
// Same here, it's just string concatenation, it won't kill us
|
||||
// More important is that we don't fuck up the command
|
||||
// But we shouldn't be able to since it's passed by value
|
||||
previous := command.LuaExpr
|
||||
luaExpr := BuildLuaScript(command.LuaExpr)
|
||||
previous := command.Lua
|
||||
luaExpr := BuildLuaScript(command.Lua)
|
||||
logger.Debug("Transformed Lua expression: %q → %q", previous, luaExpr)
|
||||
|
||||
// Process all regex matches
|
||||
|
@@ -28,7 +28,7 @@ func normalizeWhitespace(s string) string {
|
||||
func ApiAdaptor(content string, regex string, lua string) (string, int, int, error) {
|
||||
command := utils.ModifyCommand{
|
||||
Pattern: regex,
|
||||
LuaExpr: lua,
|
||||
Lua: lua,
|
||||
LogLevel: "TRACE",
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user