Closed catalinstochita closed 1 year ago
After some testing, looks like we can change the char in .pest to accept it From
char = _{
!("\"" | "\\" | "\'") ~ ANY
| "\\" ~ ("\"" | "\'" | "\\" | "/" | "b" | "f" | "n" | "r" | "t")
| "\\" ~ ("u" ~ ASCII_HEX_DIGIT{4})
}
To
char = _{
!("\"" | "\\" | "\'") ~ ANY
| "\\" ~ ("\"" | "\'" | "\\" | "/" | "b" | "f" | "n" | "r" | "t" | "(" | ")")
| "\\" ~ ("u" ~ ASCII_HEX_DIGIT{4})
}
Hi @catalinstochita ! Thanks for bringing this up. Yeah, it seems to be a bug in the parser.
Hello. It looks like escaping characters in regex is problematic
assertion left == right failed left: [NoValue] right: [Slice(Object {"author": String("d(Rees)")})]
If you try to escape with \ it won't work either 'd\(Rees\)' won't compile, expecting an atom 'd\\(Rees\\)' compiles but it will look for \ in value and () is still treated like a capture group And if you don't escape the () is considered a capture group