mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-25 14:35:54 +00:00
bfe57be65d
I've made it more performant and fixed a few bugs by using regexes instead of PHP loops, where possible, under the assumption that the PCRE parser is more efficient than the same thing implemented in pure PHP. Also, I'm now passing the same string around and calculating offsets, which Tim tells me is far more performant than continually truncating the same string. All tests still pass, with the exception of string.t, which I've modified to remove the offending code, which never worked.
2 lines
32 B
Perl
2 lines
32 B
Perl
"a\tb" = "a b" & "a\qb" = "aqb"
|