slachiewicz opened a new pull request, #1131:
URL: https://github.com/apache/maven-doxia/pull/1131

   `Xhtml5BaseParser` opens a section for every heading, but only 
`Xhtml5Parser` closed them, at `</body>`. A fragment or any input to the base 
parser, and so also the content the Markdown and FML parsers hand to it, left 
`section1` and deeper open at the end, which breaks the `Sink` contract. A new 
protected hook, `AbstractXmlParser.handleEndDocument(Sink)`, runs once after 
the last event, and `Xhtml5BaseParser` uses it to close the heading sections 
that are still open.
   
   The hook is new protected API with `@since 2.2.1`; say if it should wait for 
the next minor version instead. The validator in #1126 reported the open 
sections.
   
   Verified: `test.xhtml` and `fun.html` through `Xhtml5Parser`, and `test.xml` 
through `XdocParser`, into `Xhtml5BaseSink` → byte-identical HTML to master; 
only input without a `<body>` gains the closing `</section>`.
   
   ---
   
   To make clear that you license your contribution under
   the [Apache License Version 2.0, January 
2004](https://www.apache.org/licenses/LICENSE-2.0)
   check one of the following:
   
   - [x] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0)
   - [x] I hereby declare that I have filed an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to