Package org.commonmark.internal
Class IndentedCodeBlockParser
- java.lang.Object
-
- org.commonmark.parser.block.AbstractBlockParser
-
- org.commonmark.internal.IndentedCodeBlockParser
-
- All Implemented Interfaces:
BlockParser
public class IndentedCodeBlockParser extends AbstractBlockParser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IndentedCodeBlockParser.Factory
-
Field Summary
Fields Modifier and Type Field Description private IndentedCodeBlock
block
private java.util.List<java.lang.CharSequence>
lines
-
Constructor Summary
Constructors Constructor Description IndentedCodeBlockParser()
-
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.void
closeBlock()
Block
getBlock()
BlockContinue
tryContinue(ParserState state)
-
Methods inherited from class org.commonmark.parser.block.AbstractBlockParser
addSourceSpan, canContain, canHaveLazyContinuationLines, isContainer, parseInlines
-
-
-
-
Field Detail
-
block
private final IndentedCodeBlock block
-
lines
private final java.util.List<java.lang.CharSequence> lines
-
-
Method Detail
-
getBlock
public Block 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
-
closeBlock
public void closeBlock()
- Specified by:
closeBlock
in interfaceBlockParser
- Overrides:
closeBlock
in classAbstractBlockParser
-
-