Package com.vladsch.flexmark.parser.core
Class FencedCodeBlockParser
java.lang.Object
com.vladsch.flexmark.parser.block.AbstractBlockParser
com.vladsch.flexmark.parser.core.FencedCodeBlockParser
- All Implemented Interfaces:
BlockParser
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FencedCodeBlockprivate static final Patternprivate final booleanprivate BlockContentprivate final charprivate final intprivate final intprivate final intprivate final booleanprivate static final Pattern -
Constructor Summary
ConstructorsConstructorDescriptionFencedCodeBlockParser(DataHolder options, char fenceChar, int fenceLength, int fenceIndent, int fenceMarkerIndent) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLine(ParserState state, BasedSequence line) Add another line to the blockvoidcloseBlock(ParserState state) getBlock()intintbooleanisPropagatingLastBlankLine(BlockParser lastMatchedBlockParser) should be overridden in BlockQuote, FencedCode and ListItemtryContinue(ParserState state) See if the block parser can continue parsing the current blockMethods inherited from class com.vladsch.flexmark.parser.block.AbstractBlockParser
breakOutOnDoubleBlankLine, canContain, canInterruptBy, finalizeClosedBlock, getBlockContent, getDataHolder, isClosed, isContainer, isInterruptible, isParagraphParser, isRawText, parseInlines, removeBlankLines
-
Field Details
-
OPENING_FENCE
-
CLOSING_FENCE
-
block
-
-
fenceChar
private final char fenceChar -
fenceLength
private final int fenceLength -
fenceIndent
private final int fenceIndent -
fenceMarkerIndent
private final int fenceMarkerIndent -
matchingCloser
private final boolean matchingCloser -
codeContentBlock
private final boolean codeContentBlock
-
-
Constructor Details
-
FencedCodeBlockParser
public FencedCodeBlockParser(DataHolder options, char fenceChar, int fenceLength, int fenceIndent, int fenceMarkerIndent)
-
-
Method Details
-
getBlock
- Returns:
- the block parser's block node instance
-
getFenceIndent
public int getFenceIndent() -
getFenceMarkerIndent
public int getFenceMarkerIndent() -
tryContinue
Description copied from interface:BlockParserSee if the block parser can continue parsing the current block- Parameters:
state- current parsing state- Returns:
- block continue instance
-
addLine
Description copied from interface:BlockParserAdd another line to the block- Specified by:
addLinein interfaceBlockParser- Overrides:
addLinein classAbstractBlockParser- Parameters:
state- parser stateline- line sequence
-
isPropagatingLastBlankLine
Description copied from class:AbstractBlockParsershould be overridden in BlockQuote, FencedCode and ListItem- Specified by:
isPropagatingLastBlankLinein interfaceBlockParser- Overrides:
isPropagatingLastBlankLinein classAbstractBlockParser- Parameters:
lastMatchedBlockParser- the last matched block parser instance- Returns:
- true if the blank line should be propagated to parent
-
closeBlock
-