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 2020/06/16 10:25:31 UTC

[maven-doxia] branch DOXIA-568 updated (4d2c04e -> cf0a0ba)

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 4d2c04e  [DOXIA-568] Enable ANCHORLINKS extension
     add 2ad48e1  [DOXIA-607] Add support for XHTML5 keygen element
     add 3c7fca8  [MNGSITE-393] remove old Maven 1 and 2 info (#20)
     add ff7094a  added README
     add cdf3650  README improvement
     new cf0a0ba  [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   (4d2c04e)
            \
             N -- N -- N   refs/heads/DOXIA-568 (cf0a0ba)

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:
 README.md                                          | 99 ++++++++++++++++++++++
 .../org/apache/maven/doxia/markup/HtmlMarkup.java  | 11 +++
 .../org/apache/maven/doxia/util/HtmlTools.java     | 34 ++++----
 doxia-sink-api/src/site/apt/index.apt              | 37 --------
 4 files changed, 127 insertions(+), 54 deletions(-)
 create mode 100644 README.md


[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 cf0a0babbcda4d164d74e9bb5285a8b66f248f31
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    |  9 ++++++---
 .../doxia/module/markdown/MarkdownParserTest.java      | 18 ++++++++++++------
 2 files changed, 18 insertions(+), 9 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..a00adda 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
@@ -134,15 +134,18 @@ public class MarkdownParser
         throws IOException
     {
         String text = IOUtil.toString( source );
-        MutableDataHolder flexmarkOptions = PegdownOptionsAdapter.flexmarkOptions(
-                Extensions.ALL & ~( Extensions.HARDWRAPS | Extensions.ANCHORLINKS ) ).toMutable();
+
         ArrayList<Extension> extensions = new ArrayList<>();
+
+        MutableDataHolder flexmarkOptions = PegdownOptionsAdapter
+                .flexmarkOptions( Extensions.ALL & ~( Extensions.HARDWRAPS ) )
+                .toMutable();
         for ( Extension extension : flexmarkOptions.get( com.vladsch.flexmark.parser.Parser.EXTENSIONS ) )
         {
             extensions.add( extension );
         }
-
         extensions.add( FlexmarkDoxiaExtension.create() );
+
         flexmarkOptions.set( com.vladsch.flexmark.parser.Parser.EXTENSIONS, extensions );
         flexmarkOptions.set( HtmlRenderer.HTML_BLOCK_OPEN_TAG_EOL, false );
         flexmarkOptions.set( HtmlRenderer.HTML_BLOCK_CLOSE_TAG_EOL, false );
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 861dc9f..7149879 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}.
  *
@@ -361,6 +362,11 @@ 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