Class TableBlockParser
java.lang.Object
org.commonmark.parser.block.AbstractBlockParser
org.commonmark.ext.gfm.tables.internal.TableBlockParser
- All Implemented Interfaces:
BlockParser
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TableBlockprivate booleanprivate final List<TableBlockParser.TableCellInfo> private final List<SourceLine> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateTableBlockParser(List<TableBlockParser.TableCellInfo> columns, SourceLine headerLine) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLine(SourceLine line) Add the part of a line that belongs to this block parser to parse (i.e.booleanReturn true if the block can have lazy continuation lines.private static TableCell.AlignmentgetAlignment(boolean left, boolean right) getBlock()private TableCellparseCell(SourceLine cell, int column, InlineParser inlineParser) voidparseInlines(InlineParser inlineParser) private static List<TableBlockParser.TableCellInfo> private static List<SourceLine> split(SourceLine line) tryContinue(ParserState state) Methods inherited from class org.commonmark.parser.block.AbstractBlockParser
addSourceSpan, canContain, closeBlock, getDefinitions, isContainer
-
Field Details
-
block
-
rowLines
-
columns
-
canHaveLazyContinuationLines
private boolean canHaveLazyContinuationLines
-
-
Constructor Details
-
TableBlockParser
-
-
Method Details
-
canHaveLazyContinuationLines
public boolean canHaveLazyContinuationLines()Description copied from interface:BlockParserReturn true if the block can have lazy continuation lines.Lazy continuation lines are lines that were rejected by this
BlockParser.tryContinue(ParserState)but didn't match any other block parsers either.If true is returned here, those lines will get added via
BlockParser.addLine(SourceLine). For false, the block is closed instead.- Specified by:
canHaveLazyContinuationLinesin interfaceBlockParser- Overrides:
canHaveLazyContinuationLinesin classAbstractBlockParser
-
getBlock
-
tryContinue
-
addLine
Description copied from interface:BlockParserAdd the part of a line that belongs to this block parser to parse (i.e. without any container block markers). Note that the line will only include aSourceLine.getSourceSpan()if source spans are enabled for inlines.- Specified by:
addLinein interfaceBlockParser- Overrides:
addLinein classAbstractBlockParser
-
parseInlines
- Specified by:
parseInlinesin interfaceBlockParser- Overrides:
parseInlinesin classAbstractBlockParser
-
parseCell
-
split
-
parseSeparator
-
getAlignment
-