Class EnumeratedReferenceBlockParser
java.lang.Object
com.vladsch.flexmark.parser.block.AbstractBlockParser
com.vladsch.flexmark.ext.enumerated.reference.internal.EnumeratedReferenceBlockParser
- All Implemented Interfaces:
BlockParser
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
static class
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final EnumeratedReferenceBlock
private BlockContent
(package private) static Pattern
(package private) static String
(package private) static Pattern
-
Constructor Summary
ConstructorsConstructorDescriptionEnumeratedReferenceBlockParser
(EnumeratedReferenceOptions options, int contentOffset) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLine
(ParserState state, BasedSequence line) Add another line to the blockboolean
canContain
(ParserState state, BlockParser blockParser, Block block) void
closeBlock
(ParserState state) getBlock()
boolean
void
parseInlines
(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 com.vladsch.flexmark.parser.block.AbstractBlockParser
breakOutOnDoubleBlankLine, canInterruptBy, finalizeClosedBlock, getDataHolder, isClosed, isInterruptible, isParagraphParser, isPropagatingLastBlankLine, isRawText, removeBlankLines
-
Field Details
-
ENUM_REF_ID
-
ENUM_REF_ID_PATTERN
-
ENUM_REF_DEF_PATTERN
-
block
-
-
-
Constructor Details
-
EnumeratedReferenceBlockParser
-
-
Method Details
-
getBlockContent
- Specified by:
getBlockContent
in interfaceBlockParser
- Overrides:
getBlockContent
in classAbstractBlockParser
- Returns:
- get the currently accumulated block content. May or may not be implemented by any parser except for the
ParagraphParser
or one that returns true forBlockParser.isParagraphParser()
-
getBlock
- Returns:
- the block parser's block node instance
-
tryContinue
Description copied from interface:BlockParser
See if the block parser can continue parsing the current block- Parameters:
state
- current parsing state- Returns:
- block continue instance
-
addLine
Description copied from interface:BlockParser
Add another line to the block- Specified by:
addLine
in interfaceBlockParser
- Overrides:
addLine
in classAbstractBlockParser
- Parameters:
state
- parser stateline
- line sequence
-
closeBlock
-
parseInlines
Description copied from interface:BlockParser
Do inline processing for the block content using the given inline parser interface- Specified by:
parseInlines
in interfaceBlockParser
- Overrides:
parseInlines
in classAbstractBlockParser
- Parameters:
inlineParser
- instance of inline parser
-
isContainer
public boolean isContainer()- Specified by:
isContainer
in interfaceBlockParser
- Overrides:
isContainer
in classAbstractBlockParser
- Returns:
- true if the block that is parsed is a container (contains other blocks), or false if it's a leaf.
-
canContain
- Specified by:
canContain
in interfaceBlockParser
- Overrides:
canContain
in 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
-