Class SimTocBlockParser
java.lang.Object
com.vladsch.flexmark.parser.block.AbstractBlockParser
com.vladsch.flexmark.ext.toc.internal.SimTocBlockParser
- All Implemented Interfaces:
BlockParser
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classstatic class(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BasedSequenceprivate final SimTocBlock(package private) static int(package private) static int(package private) static int(package private) static intprivate intprivate final TocOptions -
Constructor Summary
ConstructorsConstructorDescriptionSimTocBlockParser(DataHolder options, BasedSequence tocChars, BasedSequence styleChars, BasedSequence titleChars) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLine(ParserState state, BasedSequence line) Add another line to the blockbooleancanContain(ParserState state, BlockParser blockParser, Block block) voidcloseBlock(ParserState state) getBlock()booleanvoidparseInlines(InlineParser inlineParser) Do inline processing for the block content using the given inline parser interfacetryContinue(ParserState state) See if the block parser can continue parsing the current blockMethods inherited from class AbstractBlockParser
breakOutOnDoubleBlankLine, canInterruptBy, finalizeClosedBlock, getBlockContent, getDataHolder, isClosed, isInterruptible, isParagraphParser, isPropagatingLastBlankLine, isRawText, removeBlankLines
-
Field Details
-
HAVE_HTML
static int HAVE_HTML -
HAVE_HEADING
static int HAVE_HEADING -
HAVE_LIST
static int HAVE_LIST -
HAVE_BLANK_LINE
static int HAVE_BLANK_LINE -
block
-
options
-
haveChildren
private int haveChildren -
blankLineSpacer
-
-
Constructor Details
-
SimTocBlockParser
SimTocBlockParser(DataHolder options, BasedSequence tocChars, BasedSequence styleChars, BasedSequence titleChars)
-
-
Method Details
-
getBlock
- Returns:
- the block parser's block node instance
-
tryContinue
Description copied from interface:BlockParserSee if the block parser can continue parsing the current block- Parameters:
state- current parsing state- Returns:
- block continue instance
-
canContain
- Specified by:
canContainin interfaceBlockParser- Overrides:
canContainin 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
-
isContainer
public boolean isContainer()- Specified by:
isContainerin interfaceBlockParser- Overrides:
isContainerin classAbstractBlockParser- Returns:
- true if the block that is parsed is a container (contains other blocks), or false if it's a leaf.
-
addLine
Description copied from interface:BlockParserAdd another line to the block- Specified by:
addLinein interfaceBlockParser- Overrides:
addLinein classAbstractBlockParser- Parameters:
state- parser stateline- line sequence
-
closeBlock
-
parseInlines
Description copied from interface:BlockParserDo inline processing for the block content using the given inline parser interface- Specified by:
parseInlinesin interfaceBlockParser- Overrides:
parseInlinesin classAbstractBlockParser- Parameters:
inlineParser- instance of inline parser
-