Package org.commonmark.internal
Class ListBlockParser
java.lang.Object
org.commonmark.parser.block.AbstractBlockParser
org.commonmark.internal.ListBlockParser
- All Implemented Interfaces:
BlockParser
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprivate static classprivate static class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanContain(Block childBlock) getBlock()booleanReturn true if the block that is parsed is a container (contains other blocks), or false if it's a leaf.private static booleanisSpaceTabOrEnd(CharSequence line, int index) private static booleanlistsMatch(ListBlock a, ListBlock b) Returns true if the two list items are of the same type, with the same delimiter and bullet character.private static ListBlockParser.ListDataparseList(CharSequence line, int markerIndex, int markerColumn, boolean inParagraph) Parse a list marker and return data on the marker or null.private static ListBlockParser.ListMarkerDataparseListMarker(CharSequence line, int index) private static ListBlockParser.ListMarkerDataparseOrderedList(CharSequence line, int index) tryContinue(ParserState state) Methods inherited from class org.commonmark.parser.block.AbstractBlockParser
addLine, addSourceSpan, canHaveLazyContinuationLines, closeBlock, getDefinitions, parseInlines
-
Field Details
-
block
-
hadBlankLine
private boolean hadBlankLine -
linesAfterBlank
private int linesAfterBlank
-
-
Constructor Details
-
ListBlockParser
-
-
Method Details
-
isContainer
public boolean isContainer()Description copied from interface:BlockParserReturn true if the block that is parsed is a container (contains other blocks), or false if it's a leaf.- Specified by:
isContainerin interfaceBlockParser- Overrides:
isContainerin classAbstractBlockParser
-
canContain
- Specified by:
canContainin interfaceBlockParser- Overrides:
canContainin classAbstractBlockParser
-
getBlock
-
tryContinue
-
parseList
private static ListBlockParser.ListData parseList(CharSequence line, int markerIndex, int markerColumn, boolean inParagraph) Parse a list marker and return data on the marker or null. -
parseListMarker
-
parseOrderedList
-
isSpaceTabOrEnd
-
listsMatch
Returns true if the two list items are of the same type, with the same delimiter and bullet character. This is used in agglomerating list items into lists.
-