-
Notifications
You must be signed in to change notification settings - Fork 167
Fix nonewlines mode #76
Copy link
Copy link
Closed
Description
As noted in #34 (comment), nonewlines mode uses \z in character classes, but that just acts as z and not end of string. This presents a few problems:
- Patch it so
nonewlinesdoesn't mess up in the presence ofz. - Act properly in terms matching the end of the string, this may require more advanced regex syntax rewriting rather than just running regex replacements on regexes.
Specifically, this line needs to be fixed to do a proper replacement strategy that doesn't replace \n with \z when the \n is in a character class, and maybe replaces the character class with (?:[...]|\z) where ... is everything that was in the character class except the \n. This probably would also need a different rewrite for inverted character classes.
cc @robinst
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels