Rename pattern to regex
This commit is contained in:
@@ -23,14 +23,14 @@ type CaptureGroup struct {
|
||||
// ProcessContent applies regex replacement with Lua processing
|
||||
func ProcessRegex(content string, command utils.ModifyCommand) ([]utils.ReplaceCommand, error) {
|
||||
var commands []utils.ReplaceCommand
|
||||
logger.Trace("Processing regex: %q", command.Pattern)
|
||||
logger.Trace("Processing regex: %q", command.Regex)
|
||||
|
||||
// Start timing the regex processing
|
||||
startTime := time.Now()
|
||||
|
||||
// We don't HAVE to do this multiple times for a pattern
|
||||
// But it's quick enough for us to not care
|
||||
pattern := resolveRegexPlaceholders(command.Pattern)
|
||||
pattern := resolveRegexPlaceholders(command.Regex)
|
||||
logger.Debug("Compiling regex pattern: %s", pattern)
|
||||
|
||||
patternCompileStart := time.Now()
|
||||
|
@@ -33,7 +33,7 @@ func normalizeWhitespace(s string) string {
|
||||
|
||||
func ApiAdaptor(content string, regex string, lua string) (string, int, int, error) {
|
||||
command := utils.ModifyCommand{
|
||||
Pattern: regex,
|
||||
Regex: regex,
|
||||
Lua: lua,
|
||||
LogLevel: "TRACE",
|
||||
}
|
||||
|
Reference in New Issue
Block a user