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
public class FencedCodeBlockParser extends AbstractBlockParser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FencedCodeBlockParser.Factory
-
Constructor Summary
Constructors Constructor Description FencedCodeBlockParser(DataHolder options, char fenceChar, int fenceLength, int fenceIndent, int fenceMarkerIndent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLine(ParserState state, BasedSequence line)
Add another line to the blockvoid
closeBlock(ParserState state)
Block
getBlock()
int
getFenceIndent()
int
getFenceMarkerIndent()
boolean
isPropagatingLastBlankLine(BlockParser lastMatchedBlockParser)
should be overridden in BlockQuote, FencedCode and ListItemBlockContinue
tryContinue(ParserState state)
See if the block parser can continue parsing the current block-
Methods inherited from class com.vladsch.flexmark.parser.block.AbstractBlockParser
breakOutOnDoubleBlankLine, canContain, canInterruptBy, finalizeClosedBlock, getBlockContent, getDataHolder, isClosed, isContainer, isInterruptible, isParagraphParser, isRawText, parseInlines, removeBlankLines
-
-
-
-
Constructor Detail
-
FencedCodeBlockParser
public FencedCodeBlockParser(DataHolder options, char fenceChar, int fenceLength, int fenceIndent, int fenceMarkerIndent)
-
-
Method Detail
-
getBlock
public Block getBlock()
- Returns:
- the block parser's block node instance
-
getFenceIndent
public int getFenceIndent()
-
getFenceMarkerIndent
public int getFenceMarkerIndent()
-
tryContinue
public BlockContinue tryContinue(ParserState state)
Description copied from interface:BlockParser
See if the block parser can continue parsing the current block- Parameters:
state
- current parsing state- Returns:
- block continue instance
-
addLine
public void addLine(ParserState state, BasedSequence line)
Description copied from interface:BlockParser
Add another line to the block- Specified by:
addLine
in interfaceBlockParser
- Overrides:
addLine
in classAbstractBlockParser
- Parameters:
state
- parser stateline
- line sequence
-
isPropagatingLastBlankLine
public boolean isPropagatingLastBlankLine(BlockParser lastMatchedBlockParser)
Description copied from class:AbstractBlockParser
should be overridden in BlockQuote, FencedCode and ListItem- Specified by:
isPropagatingLastBlankLine
in interfaceBlockParser
- Overrides:
isPropagatingLastBlankLine
in classAbstractBlockParser
- Parameters:
lastMatchedBlockParser
- the last matched block parser instance- Returns:
- true if the blank line should be propagated to parent
-
closeBlock
public void closeBlock(ParserState state)
-
-