Package org.commonmark.internal
Class DocumentBlockParser
java.lang.Object
org.commonmark.parser.block.AbstractBlockParser
org.commonmark.internal.DocumentBlockParser
- All Implemented Interfaces:
BlockParser
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLine
(SourceLine line) Add the part of a line that belongs to this block parser to parse (i.e.boolean
canContain
(Block block) getBlock()
boolean
Return true if the block that is parsed is a container (contains other blocks), or false if it's a leaf.tryContinue
(ParserState state) Methods inherited from class org.commonmark.parser.block.AbstractBlockParser
addSourceSpan, canHaveLazyContinuationLines, closeBlock, getDefinitions, parseInlines
-
Field Details
-
document
-
-
Constructor Details
-
DocumentBlockParser
public DocumentBlockParser()
-
-
Method Details
-
isContainer
public boolean isContainer()Description copied from interface:BlockParser
Return true if the block that is parsed is a container (contains other blocks), or false if it's a leaf.- Specified by:
isContainer
in interfaceBlockParser
- Overrides:
isContainer
in classAbstractBlockParser
-
canContain
- Specified by:
canContain
in interfaceBlockParser
- Overrides:
canContain
in classAbstractBlockParser
-
getBlock
-
tryContinue
-
addLine
Description copied from interface:BlockParser
Add the part of a line that belongs to this block parser to parse (i.e. without any container block markers). Note that the line will only include aSourceLine.getSourceSpan()
if source spans are enabled for inlines.- Specified by:
addLine
in interfaceBlockParser
- Overrides:
addLine
in classAbstractBlockParser
-