Fix Regex::replace_all to actually do something

This commit is contained in:
Twan van Laarhoven
2020-04-20 21:18:40 +02:00
parent a5b2b77d2a
commit b0180547ae
3 changed files with 4 additions and 7 deletions
+1 -2
View File
@@ -128,8 +128,7 @@ SCRIPT_FUNCTION_WITH_SIMPLIFY(replace) {
SCRIPT_RETURN(replacer.apply(ctx, input));
} else {
// simple replacing
replacer.match->replace_all(&input, replacer.replacement_string);
SCRIPT_RETURN(input);
SCRIPT_RETURN(replacer.match->replace_all(input, replacer.replacement_string));
}
}
SCRIPT_FUNCTION_SIMPLIFY_CLOSURE(replace) {