You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2024/08/16 20:43:24 UTC

(maven-doxia) branch DOXIA-739 updated (86cd7c6a -> f4fef4a5)

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

michaelo pushed a change to branch DOXIA-739
in repository https://gitbox.apache.org/repos/asf/maven-doxia.git


 discard 86cd7c6a [DOXIA-739] Disable source code highlighters for verbatim blocks for Markdown
     add 4fe6c91c [DOXIA-738] Add Footnote extention for Markdown module
     new f4fef4a5 [DOXIA-739] Disable source code highlighters for verbatim blocks for Markdown

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (86cd7c6a)
            \
             N -- N -- N   refs/heads/DOXIA-739 (f4fef4a5)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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.


Summary of changes:
 doxia-modules/doxia-module-markdown/pom.xml                          | 5 +++++
 .../java/org/apache/maven/doxia/module/markdown/MarkdownParser.java  | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)


(maven-doxia) 01/01: [DOXIA-739] Disable source code highlighters for verbatim blocks for Markdown

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

michaelo pushed a commit to branch DOXIA-739
in repository https://gitbox.apache.org/repos/asf/maven-doxia.git

commit f4fef4a55d0a75f55eccdf01642a7bea72ec06b6
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Fri Aug 16 22:31:01 2024 +0200

    [DOXIA-739] Disable source code highlighters for verbatim blocks for Markdown
    
    This closes #223
---
 .../java/org/apache/maven/doxia/parser/AbstractParserTest.java     | 7 ++++++-
 .../org/apache/maven/doxia/module/markdown/MarkdownParser.java     | 1 +
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/doxia-core/src/test/java/org/apache/maven/doxia/parser/AbstractParserTest.java b/doxia-core/src/test/java/org/apache/maven/doxia/parser/AbstractParserTest.java
index 285d9c0a..a33f2972 100644
--- a/doxia-core/src/test/java/org/apache/maven/doxia/parser/AbstractParserTest.java
+++ b/doxia-core/src/test/java/org/apache/maven/doxia/parser/AbstractParserTest.java
@@ -228,7 +228,12 @@ public abstract class AbstractParserTest extends AbstractModuleTest {
         boolean isInlineCode;
         if (atts.isEmpty()) {
             isInlineCode = true;
-            assertSinkAttributesEqual(it.next(), "inline", SinkEventAttributeSet.Semantics.CODE);
+            SinkEventAttributes attrs = new SinkEventAttributeSet();
+            attrs.addAttributes(SinkEventAttributeSet.Semantics.CODE);
+            if (outputExtension().equals("md")) {
+                attrs.addAttribute(SinkEventAttributes.CLASS, "nohighlight nocode");
+            }
+            assertSinkAttributesEqual(it.next(), "inline", attrs);
         } else {
             isInlineCode = false;
             assertEquals(SinkEventAttributeSet.SOURCE, atts);
diff --git a/doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownParser.java b/doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownParser.java
index e0629dc9..17093b0a 100644
--- a/doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownParser.java
+++ b/doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownParser.java
@@ -149,6 +149,7 @@ public class MarkdownParser extends AbstractTextParser implements TextMarkup {
         flexmarkOptions.set(HtmlRenderer.HTML_BLOCK_OPEN_TAG_EOL, false);
         flexmarkOptions.set(HtmlRenderer.HTML_BLOCK_CLOSE_TAG_EOL, false);
         flexmarkOptions.set(HtmlRenderer.MAX_TRAILING_BLANK_LINES, -1);
+        flexmarkOptions.set(HtmlRenderer.FENCED_CODE_NO_LANGUAGE_CLASS, "nohighlight nocode");
 
         // Build the Markdown parser
         FLEXMARK_PARSER =