Skip to content

Commit ceb7729

Browse files
michael-ohboutemy
authored andcommitted
[DOXIA-650] Make MarkdownParser to be a text parser with text markup
1 parent 47a1bb2 commit ceb7729

File tree

1 file changed

+4
-13
lines changed
  • doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown

1 file changed

+4
-13
lines changed

doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownParser.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@
3636

3737
import org.apache.commons.io.input.CharSequenceReader;
3838
import org.apache.maven.doxia.markup.HtmlMarkup;
39+
import org.apache.maven.doxia.markup.TextMarkup;
3940
import org.apache.maven.doxia.module.xhtml.XhtmlParser;
40-
import org.apache.maven.doxia.parser.AbstractParser;
41+
import org.apache.maven.doxia.parser.AbstractTextParser;
4142
import org.apache.maven.doxia.parser.ParseException;
4243
import org.apache.maven.doxia.parser.Parser;
4344
import org.apache.maven.doxia.sink.Sink;
@@ -69,7 +70,8 @@
6970
*/
7071
@Component( role = Parser.class, hint = MarkdownParser.ROLE_HINT )
7172
public class MarkdownParser
72-
extends AbstractParser
73+
extends AbstractTextParser
74+
implements TextMarkup
7375
{
7476

7577
/**
@@ -98,17 +100,6 @@ public class MarkdownParser
98100
"^[ \\t]*([^:\\r\\n]+?)[ \\t]*:[ \\t]*([^\\r\\n]*)[ \\t]*$",
99101
Pattern.MULTILINE );
100102

101-
/**
102-
* <p>getType.</p>
103-
*
104-
* @return a int.
105-
*/
106-
@Override
107-
public int getType()
108-
{
109-
return TXT_TYPE;
110-
}
111-
112103
/**
113104
* The parser of the HTML produced by Flexmark, that we will
114105
* use to convert this HTML to Sink events

0 commit comments

Comments
 (0)