Package org.commonmark.internal
Class FencedCodeBlockParser
java.lang.Object
org.commonmark.parser.block.AbstractBlockParser
org.commonmark.internal.FencedCodeBlockParser
- All Implemented Interfaces:
BlockParser
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FencedCodeBlock
private final char
private String
private final int
private StringBuilder
-
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.private static FencedCodeBlockParser
checkOpener
(CharSequence line, int index, int indent) void
getBlock()
private boolean
tryClosing
(CharSequence line, int index) tryContinue
(ParserState state) Methods inherited from class org.commonmark.parser.block.AbstractBlockParser
addSourceSpan, canContain, canHaveLazyContinuationLines, isContainer, parseInlines
-
Field Details
-
block
-
fenceChar
private final char fenceChar -
openingFenceLength
private final int openingFenceLength -
firstLine
-
otherLines
-
-
Constructor Details
-
FencedCodeBlockParser
public FencedCodeBlockParser(char fenceChar, int fenceLength, int fenceIndent)
-
-
Method Details
-
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
-
closeBlock
public void closeBlock()- Specified by:
closeBlock
in interfaceBlockParser
- Overrides:
closeBlock
in classAbstractBlockParser
-
checkOpener
-
tryClosing
-