Please sign in to comment.
Avoid escaping literal string twice
Fix failure in ("(" | ")")("(") inside an instance of RegexParsers. The problem is the implementation of the `|` operator in RegexParsers. When running the above code, "(" is escaped twice. Printing the above parser results in: /(\\\()|(\))/ and using a debugger confirms the result. With this fix, the existing regular expression is not escaped again. Note that escapeRegex escapes a normal string to produce a regex, unlike the name may suggest. A complete example reproducing the issue is available at: https://gist.github.com/Blaisorblade/4743188
- Loading branch information...
Showing with 2 additions and 2 deletions.