You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kw...@apache.org on 2026/02/16 11:23:33 UTC

(maven-doxia) branch bugfix/non-semantic-inline-attributes created (now cd51872b)

This is an automated email from the ASF dual-hosted git repository.

kwin pushed a change to branch bugfix/non-semantic-inline-attributes
in repository https://gitbox.apache.org/repos/asf/maven-doxia.git


      at cd51872b Add (failing) test case for multiple inline attributes

This branch includes the following new commits:

     new cd51872b Add (failing) test case for multiple inline attributes

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(maven-doxia) 01/01: Add (failing) test case for multiple inline attributes

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch bugfix/non-semantic-inline-attributes
in repository https://gitbox.apache.org/repos/asf/maven-doxia.git

commit cd51872b056def7c029b3ba7b44589a17d90b34a
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Mon Feb 16 12:23:17 2026 +0100

    Add (failing) test case for multiple inline attributes
    
    This relates to #1034
---
 .../maven/doxia/module/xhtml5/Xhtml5SinkTest.java       | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/doxia-modules/doxia-module-xhtml5/src/test/java/org/apache/maven/doxia/module/xhtml5/Xhtml5SinkTest.java b/doxia-modules/doxia-module-xhtml5/src/test/java/org/apache/maven/doxia/module/xhtml5/Xhtml5SinkTest.java
index d0e0c75c..b1dadcf3 100644
--- a/doxia-modules/doxia-module-xhtml5/src/test/java/org/apache/maven/doxia/module/xhtml5/Xhtml5SinkTest.java
+++ b/doxia-modules/doxia-module-xhtml5/src/test/java/org/apache/maven/doxia/module/xhtml5/Xhtml5SinkTest.java
@@ -361,4 +361,21 @@ public class Xhtml5SinkTest extends AbstractSinkTest {
     protected String getCommentBlockFollowedByParagraph(String comment, String paragraph) {
         return getCommentBlock(comment) + getParagraphBlock(paragraph); // no line break in between
     }
+
+    @Test
+    void multipleInlineAttributes() {
+        try (Sink sink = getSink()) {
+            SinkEventAttributeSet attributes = new SinkEventAttributeSet();
+            // set different attributes (semantic, style and decoration)
+            attributes.addAttributes(SinkEventAttributeSet.LINETHROUGH);
+            attributes.addAttributes(SinkEventAttributeSet.BOLD);
+            attributes.addAttributes(SinkEventAttributeSet.Semantics.SUPERSCRIPT);
+            sink.inline(attributes);
+            sink.text("text");
+            sink.inline_();
+        }
+        // the attribute order should be kept
+        String expected = "<s><b><sup>text</sup></b></s>";
+        assertEquals(expected, getSinkContent());
+    }
 }