The regex code has historically returned the actual matched patterns and the named capture groups within regexes. When trying to count common and/or large patterns, this leads to very large outputs. I've added two new functions -RPc and -CPc that will cause wikiq to return counts of each pattern (0 when there are no matches). The options apply to all comment or revision patterns. I considered interfaces to make it possible to do some but others but concluded this would be too complicated an interface. This code should be checked before it's merged.
25 KiB
Executable File
25 KiB
Executable File