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 2022/05/27 19:25:25 UTC
[maven-doxia] 01/01: [DOXIA-650] Make MarkdownParser to be a text parser with text markup
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch DOXIA-650
in repository https://gitbox.apache.org/repos/asf/maven-doxia.git
commit b0d40921bc90ae1c87177f3e343d7dcff4f9528e
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Fri May 27 21:25:13 2022 +0200
[DOXIA-650] Make MarkdownParser to be a text parser with text markup
---
.../maven/doxia/module/markdown/MarkdownParser.java | 17 ++++-------------
1 file changed, 4 insertions(+), 13 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 445a6040..6ae517e9 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
@@ -39,8 +39,9 @@ import com.vladsch.flexmark.ext.wikilink.WikiLinkExtension;
import com.vladsch.flexmark.ext.gfm.strikethrough.StrikethroughExtension;
import org.apache.maven.doxia.markup.HtmlMarkup;
+import org.apache.maven.doxia.markup.TextMarkup;
import org.apache.maven.doxia.module.xhtml.XhtmlParser;
-import org.apache.maven.doxia.parser.AbstractParser;
+import org.apache.maven.doxia.parser.AbstractTextParser;
import org.apache.maven.doxia.parser.ParseException;
import org.apache.maven.doxia.sink.Sink;
import org.apache.maven.doxia.util.HtmlTools;
@@ -70,7 +71,8 @@ import java.util.regex.Pattern;
@Singleton
@Named( "markdown" )
public class MarkdownParser
- extends AbstractParser
+ extends AbstractTextParser
+ implements TextMarkup
{
/**
@@ -94,17 +96,6 @@ public class MarkdownParser
"^[ \\t]*([^:\\r\\n]+?)[ \\t]*:[ \\t]*([^\\r\\n]*)[ \\t]*$",
Pattern.MULTILINE );
- /**
- * <p>getType.</p>
- *
- * @return a int.
- */
- @Override
- public int getType()
- {
- return TXT_TYPE;
- }
-
/**
* The parser of the HTML produced by Flexmark, that we will
* use to convert this HTML to Sink events