Closed samhh closed 2 years ago
Doesn't affect callbacks:
{
"x": { "message": "a<f>" },
"y": { "message": "</f>b" }
}
Gives errors on each callback tag as expected.
Probably caused by all manyTill
in the ICU parser using token
, except for escaped
which uses charLiteral
.
Ideally we could reserve the characters the ICU parser can access before ever entering this module/parser. Seems like this isn't really feasible though: https://www.reddit.com/r/haskell/comments/q7ytoj/is_there_a_good_way_to_run_an_inner_parser_with/hgs73oh/
The ICU parser will need to in some way know about its callers.
Edit: Actually we're cheating a bit and using eom
for that. A bit JSON-centric.
Given:
We should parse
x
andy
as plaintext. We actually parsex
alone with a message spanning the contents of bothx
andy
sans single quotes because said single quotes are parsing as an interpolation escape, breaking out of the bounds of the message parser.This is the cause of the issues with intlc 0.4.0 in Unsplash web.
The ideal fix will be to prevent the message parser from escaping the bounds of the JSON message. The quick hack fix is to disable single quote interpolation escaping as I don't think we're using it anywhere.