-
-
Notifications
You must be signed in to change notification settings - Fork 904
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
RuntimeError "Could not parse document" on empty input in strict mode #1349
Comments
It's not due to #1005, as that was in v1.6.2.1 and that version emits a SyntaxError. I'm git bisecting now ... |
Ah, wait, strike my last comment. I was misinterpreting the output of your script. Please hold ... |
I've pushed a branch that addresses this, This will be in 1.7.0, as we're about to release 1.6.7 final. Leaving open until it's merged into master. |
Looks good. I will be waiting for the release. Thanks! |
Merged onto master, will be in 1.6.8. |
I noticed a change when updating from 1.5 to 1.6 probably related to #1005
Previously, empty input would result in an empty document, and now it raises an error. However, the error is a generic RuntimeError instead of the expected Nokogiri::XML::SyntaxError. RuntimeError is very common in Ruby so I don't like to rescue it for this very specific case. Was it ever intended to be a RuntimeError?
Here is an example:
The text was updated successfully, but these errors were encountered: