Ability to use ParseErrorList with Parser.unescapeEntities() #2394
magictractor
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
|
Hi there, That makes sense. I wonder if it would be more flexible if we had a non-static version of That would align more to the current API shape of tracking errors, and could include a limit on how many errors are collected, and would also allow other configuration for the method (not that I can think of what that might be right now). |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using
Parser.unescapeEntities(). It is working well, but I decided I would like to use aParseErrorListto log parser errors, such as missing a semicolon for character references.This was tougher than I anticipated, primarily because
Tokeniseris not public, so I could not make the obvious tweaks to a copy of theunescapeEntities()implementation.I have got close using
parseFragmentInput(), but it's non-trivial.It doesn't match
Parser.unescapeEntities()in a couple of corner cases. I don't want to derail my own post, so I'll save those for another discussion (or a reply here).I'd like to see a change to permit the use of
ParseErrorListwithParser.unescapeEntities(). That could be done in a similar manner toParser's staticparseFragment()methods:suggesting that the existing:
could be overloaded with:
I look forward to hearing your thoughts.
Beta Was this translation helpful? Give feedback.
All reactions