Skip to content

Better regex handling

Compare
Choose a tag to compare
@mnemnion mnemnion released this 22 Jul 23:01
· 14 commits to trunk since this release
v0.1.1
c851742

The regex-which-finds-regex now limits its search to a single line of the test string.

Also, the use/mention distinction is resolved in the following way: if the regex pattern is already identical to the string, we accept that as a match. This proved to be useful in ohsnap's test suite, and is clearly correct behavior: the regexen are for excluding differences between the test string and the result string, and if the regex itself is not such a difference, there's nothing to exclude.