Repository navigation
Add HtmlTag so the sink writers can leave javax.swing behind - #1097
Merged
Merged
Conversation
The writers read exactly one thing from javax.swing HTML.Tag: isBlock(), which decides whether a start tag is preceded by a newline. HtmlTag carries the name and that flag, with the values the HtmlMarkup constants report today copied unchanged, so no generated site's whitespace moves; several of them are wrong for HTML5 and correcting them is a separate change with its own site comparison. The Tag-typed writeStartTag/writeEndTag/writeSimpleTag overloads are deprecated and delegate, keeping a tag Doxia does not declare on its own block value. Step 3 of #1092.
slachiewicz
marked this pull request as ready for review
September 3, 2026 23:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Step 3 of #1092, additive.
HtmlTagcarries a tag name and an explicitisBlock, andAbstractXmlSinkgainsHtmlTagoverloads ofwriteStartTag,writeEndTagandwriteSimpleTag; theHTML.Tag-typed ones are deprecated for 2.3.0 and delegate. Step 4 then retypes theHtmlMarkupconstants and drops the Swing supertype.The block values are those the
HtmlMarkupconstants report today, copied unchanged: 24 of 117 tags are block, andHtmlTagTestreflects overHtmlMarkupto assert every one still answers the same, so a value cannot drift unnoticed and no generated site's whitespace moves. A tag Doxia does not declare —dirandnoframesare the only block ones Swing has and Doxia lacks — keeps the block value of theTagit was written with.One source-compatibility wrinkle for subclasses:
writeStartTag(null)andwriteEndTag(null)are now ambiguous and need a cast. Both call sites in this repo were inAbstractXmlSinkTest.Verified:
mvn install→ BUILD SUCCESS, all module suites green, japicmp clean on doxia-sink-api and doxia-core.This change was created with AI assistance.