@Component(role=org.apache.maven.doxia.parser.Parser.class, hint="markdown") public class MarkdownParser extends AbstractParser
Parser
for Markdown documents.
Defers effective parsing to the PegDown library, which generates HTML content
then delegates parsing of this content to a slightly modified Doxia Xhtml parser.MarkdownToDoxiaHtmlSerializer
Modifier and Type | Class and Description |
---|---|
static class |
MarkdownParser.PegDownHtmlParser
Internal parser for HTML generated by PegDown library.
|
Modifier and Type | Field and Description |
---|---|
protected static org.pegdown.PegDownProcessor |
PEGDOWN_PROCESSOR
The
PegDownProcessor used to convert Pegdown documents to HTML. |
static String |
ROLE_HINT
The role hint for the
MarkdownParser Plexus component. |
ROLE, TXT_TYPE, UNKNOWN_TYPE, XML_TYPE
Constructor and Description |
---|
MarkdownParser() |
Modifier and Type | Method and Description |
---|---|
int |
getType() |
static boolean |
isHtmlComment(org.pegdown.ast.Node node) |
static String |
nodeText(org.pegdown.ast.Node node) |
void |
parse(Reader source,
Sink sink) |
doxiaVersion, enableLogging, executeMacro, getBasedir, getLog, getMacroManager, init, isEmitComments, isSecondParsing, parse, parse, setEmitComments, setSecondParsing
public static final String ROLE_HINT
MarkdownParser
Plexus component.protected static final org.pegdown.PegDownProcessor PEGDOWN_PROCESSOR
PegDownProcessor
used to convert Pegdown documents to HTML.public MarkdownParser()
public int getType()
getType
in interface Parser
getType
in class AbstractParser
public void parse(Reader source, Sink sink) throws ParseException
ParseException
public static boolean isHtmlComment(org.pegdown.ast.Node node)
Copyright © 2005–2016 The Apache Software Foundation. All rights reserved.