Package org.commonmark.internal
Class DocumentBlockParser
- java.lang.Object
-
- org.commonmark.parser.block.AbstractBlockParser
-
- org.commonmark.internal.DocumentBlockParser
-
- All Implemented Interfaces:
BlockParser
public class DocumentBlockParser extends AbstractBlockParser
-
-
Constructor Summary
Constructors Constructor Description DocumentBlockParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLine(SourceLine line)
Add the part of a line that belongs to this block parser to parse (i.e.boolean
canContain(Block block)
Document
getBlock()
boolean
isContainer()
Return true if the block that is parsed is a container (contains other blocks), or false if it's a leaf.BlockContinue
tryContinue(ParserState state)
-
Methods inherited from class org.commonmark.parser.block.AbstractBlockParser
addSourceSpan, canHaveLazyContinuationLines, closeBlock, parseInlines
-
-
-
-
Field Detail
-
document
private final Document document
-
-
Method Detail
-
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
public boolean canContain(Block block)
- Specified by:
canContain
in interfaceBlockParser
- Overrides:
canContain
in classAbstractBlockParser
-
getBlock
public Document getBlock()
-
tryContinue
public BlockContinue tryContinue(ParserState state)
-
addLine
public void addLine(SourceLine line)
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
-
-