-
-
Notifications
You must be signed in to change notification settings - Fork 903
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
Nokogiri::XML::Node#line overflows #1003
Comments
This is a dup of #533, and the underlying issue is that libxml2 usess a |
flavorjones
added a commit
that referenced
this issue
Aug 14, 2021
flavorjones
added a commit
that referenced
this issue
Aug 14, 2021
feat(cruby): support line numbers larger than a short --- **What problem is this PR intended to solve?** As noted in #1493, #1617, #1505, #1003, and #533, libxml2 has not historically supported line numbers greater than a `short int`. Starting in libxml v2.9.0, setting the parse option `BIG_LINES` would allow tracking line numbers in longer documents. Specifically this PR makes the following changes: - set `BIG_LINES` parse option by default which will allow `Node#line` to return large integers - allow `Node#line=` to set large line numbers on text nodes Fixes #1764 **Have you included adequate test coverage?** Yes! **Does this change affect the behavior of either the C or the Java implementations?** JRuby's Xerces-based implementation did not suffer from this particular shortcoming, although its line number functionality is questionable in other ways (see #2177 / b32c875).
This will be fixed in v1.13. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not sure if anyone reported this before:
The return of the #line method obviously overflows when there are more than 65535 lines in an XML.
http://nokogiri.org/Nokogiri/XML/Node.html#method-i-line
The text was updated successfully, but these errors were encountered: