Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem is this PR intended to solve?
As the Nokogumbo merger progresses (see #2204), we now have an
HTML5
module and namespace, but the previous libxml2-(and nekohtml-) based functionality is parked under the ambiguousHTML
module and namespace.I'd like to disambiguate, and also introduce an opportunity for us to use
HTML
for more general use in the future (e.g., perhaps detection of HTML doc format and choosing the right DOM parser).This PR moves everything currently under
HTML
toHTML4
, and makesHTML
an alias forHTML4
. It updates doc strings and class names.Some changes in behavior that I want to note:
Nokogiri::HTML4::XXX
where they previously reportedNokogiri::HTML::XXX
mNokogiriHTML
is nowmNokogiriHTML4
) which might impact anyone writing C code and linking against Nokogiri's dylibHave you included adequate test coverage?
I've left the tests alone (except for the addition of some "HTML/HTML4 equivalence" tests) to demonstrate there's no behavioral breakage.
Does this change affect the behavior of either the C or the Java implementations?
Notably, I've updated the Java files to rename classes and variable, and use the proper module and class names, so that it stays in sync with CRuby despite not having an
HTML5
module/namespace.