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 FencedCodeBlockprivate final charprivate Stringprivate final intprivate StringBuilder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLine(SourceLine line) Add the part of a line that belongs to this block parser to parse (i.e.private static FencedCodeBlockParsercheckOpener(CharSequence line, int index, int indent) voidgetBlock()private booleantryClosing(CharSequence line, int index) tryContinue(ParserState state) Methods inherited from class org.commonmark.parser.block.AbstractBlockParser
addSourceSpan, canContain, canHaveLazyContinuationLines, getDefinitions, 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:BlockParserAdd 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:
addLinein interfaceBlockParser- Overrides:
addLinein classAbstractBlockParser
-
closeBlock
public void closeBlock()- Specified by:
closeBlockin interfaceBlockParser- Overrides:
closeBlockin classAbstractBlockParser
-
checkOpener
-
tryClosing
-