Package com.vladsch.flexmark.parser.core
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 class
static 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) ListItemParser
private final ListBlockParser.ListData
private final ListOptions
-
Constructor Summary
ConstructorsConstructorDescriptionListBlockParser
(ListOptions options, ListBlockParser.ListData listData, ListItemParser listItemParser) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
canContain
(ParserState state, BlockParser blockParser, Block block) void
closeBlock
(ParserState state) private static ListBlock
createListBlock
(Matcher matcher) private void
finalizeListTight
(ParserState parserState) getBlock()
(package private) int
(package private) BasedSequence
(package private) int
private static boolean
hasNonItemChildren
(ListItem item) boolean
(package private) static ListBlockParser.ListData
parseListMarker
(ListOptions options, int newItemCodeIndent, ParserState state) Parse a list marker and return data on the marker or null.(package private) void
setItemHandledLine
(BasedSequence itemHandledLine) (package private) void
setItemHandledLineSkipActive
(BasedSequence itemHandledLine) (package private) void
setItemHandledNewItemLine
(BasedSequence itemHandledLine) (package private) void
setItemHandledNewListLine
(BasedSequence itemHandledLine) void
setLastChild
(ListItemParser lastChild) private void
setTight
(boolean tight) tryContinue
(ParserState state) See if the block parser can continue parsing the current blockMethods inherited from class com.vladsch.flexmark.parser.block.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:
isContainer
in interfaceBlockParser
- Overrides:
isContainer
in 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:
canContain
in interfaceBlockParser
- Overrides:
canContain
in 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:
breakOutOnDoubleBlankLine
in interfaceBlockParser
- Overrides:
breakOutOnDoubleBlankLine
in 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:BlockParser
See if the block parser can continue parsing the current block- Parameters:
state
- current parsing state- Returns:
- block continue instance
-