bertysentry commented on a change in pull request #49:
URL: https://github.com/apache/maven-doxia/pull/49#discussion_r549793311
##########
File path:
doxia-core/src/main/java/org/apache/maven/doxia/parser/XhtmlBaseParser.java
##########
@@ -509,7 +509,8 @@ else if ( ( parser.getName().equals(
HtmlMarkup.CODE.toString() ) )
|| ( parser.getName().equals( HtmlMarkup.SAMP.toString() ) )
|| ( parser.getName().equals( HtmlMarkup.TT.toString() ) ) )
{
- sink.inline( SinkEventAttributeSet.Semantics.CODE );
+ attribs.addAttributes( SinkEventAttributeSet.Semantics.CODE );
Review comment:
Before this change, an *inline* event was added with the *CODE*
semantic, and getting rid of all potential attributes of the element being
parsed.
After this change, we add the *inline* event, with the *CODE* semantic **in
addition** to the attributes of the element being parsed.
So, `<code class="language-java">` becomes an *inline* event, with
`Semantics = "code"` and `Class = "language-java"`.
Note this reflects what was already done in **Xhtml5BaseParser.java**. I
think it was an omission.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]