-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to continue parsing after Error::EndEventMismatch
#513
Comments
I've never think about this way of reading events, but it seems to a good candidate to support. PR is welcome. Current way to achive the same is to disable reporting mismathed ends. Unfortunately, the example that shows how you can disable this only for a part of document, is bug-prone. If you do that, the <some-tag>
<event>
<!-- You decided to .check_end_names(false) after seeing "<event>" -->
...
</event>
<!-- You decided to .check_end_names(true) after seeing "</event>" -->
</some-tag><!-- EndEventMismatch { expected "event", found: "some-tag" } --> |
Ah, thanks for pointing to that method, Mingun! In the case of parsing the Netscape bookmark file there's no need to re-enable the check for end-names since there's no surrounding tag. As you said, it would be very error prone if that was the case and the desired behaviour was that of toggling on and off the check for end-names. |
Error::EndEventMismatch
Fixed: check_end_names::true_::mismatched_tags failures: dashes_in_comments
Introduce `Config` struct that holds parser configuration and implement #513
I'm trying to parse a Netscape bookmark file which has unclosed tags (i.e.
<DL>
), and for this I'm explicitly ignoring theEndEventMismatch
error during the parsing:The issue is that an
Eof
event immediately follows this, which causes that the reader stops parsing the rest of the document.I couldn't find in the documentation if this behaviour is expected, hence why I'm opening the issue.
The text was updated successfully, but these errors were encountered: