java.lang.Object
org.commonmark.parser.block.BlockStart
org.commonmark.internal.BlockStartImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BlockParser[]private intprivate intprivate booleanprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionatColumn(int newColumn) Continue parsing at the specified column (for tab handling).atIndex(int newIndex) Continue parsing at the specified index.intint(package private) intbooleanreplaceParagraphLines(int lines) Replace a number of lines from the current paragraph (as returned byMatchedBlockParser.getParagraphLines()) with the new block.Methods inherited from class org.commonmark.parser.block.BlockStart
none, of
-
Field Details
-
blockParsers
-
newIndex
private int newIndex -
newColumn
private int newColumn -
replaceActiveBlockParser
private boolean replaceActiveBlockParser -
replaceParagraphLines
private int replaceParagraphLines
-
-
Constructor Details
-
BlockStartImpl
-
-
Method Details
-
getBlockParsers
-
getNewIndex
public int getNewIndex() -
getNewColumn
public int getNewColumn() -
isReplaceActiveBlockParser
public boolean isReplaceActiveBlockParser() -
getReplaceParagraphLines
int getReplaceParagraphLines() -
atIndex
Description copied from class:BlockStartContinue parsing at the specified index.- Specified by:
atIndexin classBlockStart- Parameters:
newIndex- the new index, seeParserState.getIndex()
-
atColumn
Description copied from class:BlockStartContinue parsing at the specified column (for tab handling).- Specified by:
atColumnin classBlockStart- Parameters:
newColumn- the new column, seeParserState.getColumn()
-
replaceActiveBlockParser
- Specified by:
replaceActiveBlockParserin classBlockStart
-
replaceParagraphLines
Description copied from class:BlockStartReplace a number of lines from the current paragraph (as returned byMatchedBlockParser.getParagraphLines()) with the new block.This is useful for parsing blocks that start with normal paragraphs and only have special marker syntax in later lines, e.g. in this:
Foo ===
TheFooline is initially parsed as a normal paragraph, then===is parsed as a heading marker, replacing the 1 paragraph line before. The end result is a single Heading block.Note that source spans from the replaced lines are automatically added to the new block.
- Specified by:
replaceParagraphLinesin classBlockStart- Parameters:
lines- the number of lines to replace (at least 1); useInteger.MAX_VALUEto replace the whole paragraph
-