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 class
private static class
private static class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canContain
(Block childBlock) getBlock()
boolean
Return true if the block that is parsed is a container (contains other blocks), or false if it's a leaf.private static boolean
isSpaceTabOrEnd
(CharSequence line, int index) private static boolean
listsMatch
(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.ListData
parseList
(CharSequence line, int markerIndex, int markerColumn, boolean inParagraph) Parse a list marker and return data on the marker or null.private static ListBlockParser.ListMarkerData
parseListMarker
(CharSequence line, int index) private static ListBlockParser.ListMarkerData
parseOrderedList
(CharSequence line, int index) tryContinue
(ParserState state) Methods inherited from class org.commonmark.parser.block.AbstractBlockParser
addLine, addSourceSpan, canHaveLazyContinuationLines, closeBlock, 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:BlockParser
Return true if the block that is parsed is a container (contains other blocks), or false if it's a leaf.- Specified by:
isContainer
in interfaceBlockParser
- Overrides:
isContainer
in classAbstractBlockParser
-
canContain
- Specified by:
canContain
in interfaceBlockParser
- Overrides:
canContain
in 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.
-