You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2021/05/30 16:02:45 UTC

[maven-doxia] branch DOXIA-568 updated (eab2354 -> 5045144)

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

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


 discard eab2354  [DOXIA-568] Enable ANCHORLINKS extension
     new 5045144  [DOXIA-568] Enable ANCHORLINKS extension

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   (eab2354)
            \
             N -- N -- N   refs/heads/DOXIA-568 (5045144)

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:
 .../org/apache/maven/doxia/module/markdown/MarkdownParser.java   | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

[maven-doxia] 01/01: [DOXIA-568] Enable ANCHORLINKS extension

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

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

commit 50451449c1b2775e43fa2e76a2307e09a50de983
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Fri Feb 7 08:46:58 2020 +0100

    [DOXIA-568] Enable ANCHORLINKS extension
---
 .../maven/doxia/module/markdown/MarkdownParser.java   |  2 +-
 .../doxia/module/markdown/MarkdownParserTest.java     | 19 +++++++++++++------
 2 files changed, 14 insertions(+), 7 deletions(-)

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 f40e123..6161ad3 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
@@ -135,7 +135,7 @@ public class MarkdownParser
     {
         String text = IOUtil.toString( source );
         MutableDataHolder flexmarkOptions = PegdownOptionsAdapter.flexmarkOptions(
-                Extensions.ALL & ~( Extensions.HARDWRAPS | Extensions.ANCHORLINKS ) ).toMutable();
+                Extensions.ALL & ~( Extensions.HARDWRAPS ) ).toMutable();
         ArrayList<Extension> extensions = new ArrayList<>();
         for ( Extension extension : flexmarkOptions.get( com.vladsch.flexmark.parser.Parser.EXTENSIONS ) )
         {
diff --git a/doxia-modules/doxia-module-markdown/src/test/java/org/apache/maven/doxia/module/markdown/MarkdownParserTest.java b/doxia-modules/doxia-module-markdown/src/test/java/org/apache/maven/doxia/module/markdown/MarkdownParserTest.java
index 8110378..2075f1b 100644
--- a/doxia-modules/doxia-module-markdown/src/test/java/org/apache/maven/doxia/module/markdown/MarkdownParserTest.java
+++ b/doxia-modules/doxia-module-markdown/src/test/java/org/apache/maven/doxia/module/markdown/MarkdownParserTest.java
@@ -1,10 +1,4 @@
 package org.apache.maven.doxia.module.markdown;
-
-import java.io.IOException;
-import java.io.Reader;
-import java.util.Iterator;
-import java.util.List;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -32,6 +26,13 @@ import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet;
 import org.apache.maven.doxia.sink.impl.SinkEventElement;
 import org.apache.maven.doxia.sink.impl.SinkEventTestingSink;
 
+import java.io.IOException;
+import java.io.Reader;
+import java.util.Iterator;
+import java.util.List;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+
 /**
  * Tests for {@link MarkdownParser}.
  *
@@ -362,6 +363,12 @@ public class MarkdownParserTest
         }
     }
 
+    public void testTocMacro2() throws IOException, ParseException
+    {
+        String html = parseFileToHtml( "macro-toc" );
+        assertTrue( html.contains( "<!-- MACRO{toc|fromDepth=1|toDepth=2} -->" ) );
+    }
+    /** @throws Exception  */
     public void testTocMacro()
         throws Exception
     {