Class ListBlockParser
java.lang.Object
com.vladsch.flexmark.parser.block.AbstractBlockParser
com.vladsch.flexmark.parser.core.ListBlockParser
- All Implemented Interfaces:
BlockParser
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classstatic class(package private) static class(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ListBlock(package private) BasedSequence(package private) boolean(package private) boolean(package private) boolean(package private) ListItemParserprivate final ListBlockParser.ListDataprivate final ListOptions -
Constructor Summary
ConstructorsConstructorDescriptionListBlockParser(ListOptions options, ListBlockParser.ListData listData, ListItemParser listItemParser) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleancanContain(ParserState state, BlockParser blockParser, Block block) voidcloseBlock(ParserState state) private static ListBlockcreateListBlock(Matcher matcher) private voidfinalizeListTight(ParserState parserState) getBlock()(package private) int(package private) BasedSequence(package private) intprivate static booleanhasNonItemChildren(ListItem item) boolean(package private) static ListBlockParser.ListDataparseListMarker(ListOptions options, int newItemCodeIndent, ParserState state) Parse a list marker and return data on the marker or null.(package private) voidsetItemHandledLine(BasedSequence itemHandledLine) (package private) voidsetItemHandledLineSkipActive(BasedSequence itemHandledLine) (package private) voidsetItemHandledNewItemLine(BasedSequence itemHandledLine) (package private) voidsetItemHandledNewListLine(BasedSequence itemHandledLine) voidsetLastChild(ListItemParser lastChild) private voidsetTight(boolean tight) tryContinue(ParserState state) See if the block parser can continue parsing the current blockMethods inherited from class AbstractBlockParser
addLine, canInterruptBy, finalizeClosedBlock, getBlockContent, getDataHolder, isClosed, isInterruptible, isParagraphParser, isPropagatingLastBlankLine, isRawText, parseInlines, removeBlankLines
-
Field Details
-
myBlock
-
myOptions
-
myListData
-
myLastChild
ListItemParser myLastChild -
myItemHandledLine
BasedSequence myItemHandledLine -
myItemHandledNewListLine
boolean myItemHandledNewListLine -
myItemHandledNewItemLine
boolean myItemHandledNewItemLine -
myItemHandledSkipActiveLine
boolean myItemHandledSkipActiveLine
-
-
Constructor Details
-
ListBlockParser
public ListBlockParser(ListOptions options, ListBlockParser.ListData listData, ListItemParser listItemParser)
-
-
Method Details
-
getItemHandledLine
BasedSequence getItemHandledLine() -
setItemHandledLine
-
setItemHandledNewListLine
-
setItemHandledNewItemLine
-
setItemHandledLineSkipActive
-
getLastChild
-
setLastChild
-
getOptions
-
getListData
-
getContentIndent
int getContentIndent() -
getLastContentIndent
int getLastContentIndent() -
isContainer
public boolean isContainer()- Specified by:
isContainerin interfaceBlockParser- Overrides:
isContainerin classAbstractBlockParser- Returns:
- true if the block that is parsed is a container (contains other blocks), or false if it's a leaf.
-
canContain
- Specified by:
canContainin interfaceBlockParser- Overrides:
canContainin classAbstractBlockParser- Parameters:
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 cannot
-
getBlock
- Returns:
- the block parser's block node instance
-
setTight
private void setTight(boolean tight) -
closeBlock
-
breakOutOnDoubleBlankLine
public boolean breakOutOnDoubleBlankLine()- Specified by:
breakOutOnDoubleBlankLinein interfaceBlockParser- Overrides:
breakOutOnDoubleBlankLinein classAbstractBlockParser- Returns:
- true if Double blank line should finalize this block parser and its children and reset to parent
-
hasNonItemChildren
-
finalizeListTight
-
parseListMarker
static ListBlockParser.ListData parseListMarker(ListOptions options, int newItemCodeIndent, ParserState state) Parse a list marker and return data on the marker or null. -
createListBlock
-
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
-