public interface BlockParser
Implementations should subclass AbstractBlockParser instead of implementing this directly.
| Modifier and Type | Method and Description |
|---|---|
void |
addLine(ParserState state,
com.vladsch.flexmark.util.sequence.BasedSequence line)
Add another line to the block
|
boolean |
breakOutOnDoubleBlankLine() |
boolean |
canContain(ParserState state,
BlockParser blockParser,
com.vladsch.flexmark.ast.Block block) |
boolean |
canInterruptBy(BlockParserFactory blockParserFactory)
Allows block parsers to determine if they can be interrupted by other block parsers
|
void |
closeBlock(ParserState state) |
void |
finalizeClosedBlock()
Used to clean up and prepare for the next parsing run of the AbstractBlockParser
for internal parser house keeping not for BlockParser implementors
|
com.vladsch.flexmark.ast.Block |
getBlock() |
com.vladsch.flexmark.ast.BlockContent |
getBlockContent() |
com.vladsch.flexmark.util.options.MutableDataHolder |
getDataHolder() |
boolean |
isClosed() |
boolean |
isContainer() |
boolean |
isInterruptible()
Allows block parsers to be interrupted by other block parsers
|
boolean |
isParagraphParser() |
boolean |
isPropagatingLastBlankLine(BlockParser lastMatchedBlockParser) |
boolean |
isRawText()
Allows block parsers to keep indenting spaces for those blocks that are interruptible but don't want indenting spaces removed.
|
void |
parseInlines(InlineParser inlineParser)
Do inline processing for the block content using the given inline parser interface
|
BlockContinue |
tryContinue(ParserState state)
See if the block parser can continue parsing the current block
|
boolean isContainer()
boolean canContain(ParserState state, BlockParser blockParser, com.vladsch.flexmark.ast.Block block)
state - parser stateblockParser - block parserblock - new block being started @return true if this block parser's block can contain the given block type, false if it cannotcom.vladsch.flexmark.ast.Block getBlock()
BlockContinue tryContinue(ParserState state)
state - current parsing statevoid addLine(ParserState state, com.vladsch.flexmark.util.sequence.BasedSequence line)
state - parser stateline - line sequencevoid closeBlock(ParserState state)
boolean isClosed()
boolean isPropagatingLastBlankLine(BlockParser lastMatchedBlockParser)
lastMatchedBlockParser - last matched block parser instanceboolean breakOutOnDoubleBlankLine()
boolean isParagraphParser()
com.vladsch.flexmark.ast.BlockContent getBlockContent()
ParagraphParser or one that returns true for isParagraphParser()void finalizeClosedBlock()
void parseInlines(InlineParser inlineParser)
inlineParser - instance of inline parserboolean isInterruptible()
boolean isRawText()
boolean canInterruptBy(BlockParserFactory blockParserFactory)
blockParserFactory - interrupting block parsercom.vladsch.flexmark.util.options.MutableDataHolder getDataHolder()
AbstractBlockParserCopyright © 2018. All rights reserved.