Class SpecExampleBlockParser
- java.lang.Object
-
- com.vladsch.flexmark.parser.block.AbstractBlockParser
-
- com.vladsch.flexmark.ext.spec.example.internal.SpecExampleBlockParser
-
- All Implemented Interfaces:
BlockParser
public class SpecExampleBlockParser extends AbstractBlockParser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
SpecExampleBlockParser.BlockFactory
static class
SpecExampleBlockParser.Factory
-
Field Summary
Fields Modifier and Type Field Description (package private) SpecExampleBlock
block
private BlockContent
content
private static int
GROUP_COORD_CLOSE
private static int
GROUP_COORD_OPEN
private static int
GROUP_NUMBER
private static int
GROUP_NUMBER_SEPARATOR
private static int
GROUP_OPTION_KEYWORD
private static int
GROUP_OPTIONS
private static int
GROUP_OPTIONS_CLOSE
private static int
GROUP_OPTIONS_OPEN
private static int
GROUP_SECTION
private SpecExampleOptions
myOptions
private static java.util.regex.Pattern
OPTIONS_PATTERN
-
Constructor Summary
Constructors Constructor Description SpecExampleBlockParser(DataHolder options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLine(ParserState state, BasedSequence line)
Add another line to the blockvoid
closeBlock(ParserState state)
Block
getBlock()
boolean
isPropagatingLastBlankLine(BlockParser lastMatchedBlockParser)
should be overridden in BlockQuote, FencedCode and ListItemBlockContinue
tryContinue(ParserState state)
See if the block parser can continue parsing the current block-
Methods inherited from class com.vladsch.flexmark.parser.block.AbstractBlockParser
breakOutOnDoubleBlankLine, canContain, canInterruptBy, finalizeClosedBlock, getBlockContent, getDataHolder, isClosed, isContainer, isInterruptible, isParagraphParser, isRawText, parseInlines, removeBlankLines
-
-
-
-
Field Detail
-
OPTIONS_PATTERN
private static final java.util.regex.Pattern OPTIONS_PATTERN
-
GROUP_COORD_OPEN
private static final int GROUP_COORD_OPEN
- See Also:
- Constant Field Values
-
GROUP_SECTION
private static final int GROUP_SECTION
- See Also:
- Constant Field Values
-
GROUP_NUMBER_SEPARATOR
private static final int GROUP_NUMBER_SEPARATOR
- See Also:
- Constant Field Values
-
GROUP_NUMBER
private static final int GROUP_NUMBER
- See Also:
- Constant Field Values
-
GROUP_COORD_CLOSE
private static final int GROUP_COORD_CLOSE
- See Also:
- Constant Field Values
-
GROUP_OPTION_KEYWORD
private static final int GROUP_OPTION_KEYWORD
- See Also:
- Constant Field Values
-
GROUP_OPTIONS_OPEN
private static final int GROUP_OPTIONS_OPEN
- See Also:
- Constant Field Values
-
GROUP_OPTIONS
private static final int GROUP_OPTIONS
- See Also:
- Constant Field Values
-
GROUP_OPTIONS_CLOSE
private static final int GROUP_OPTIONS_CLOSE
- See Also:
- Constant Field Values
-
block
final SpecExampleBlock block
-
content
private BlockContent content
-
myOptions
private final SpecExampleOptions myOptions
-
-
Constructor Detail
-
SpecExampleBlockParser
public SpecExampleBlockParser(DataHolder options)
-
-
Method Detail
-
getBlock
public Block getBlock()
- Returns:
- the block parser's block node instance
-
tryContinue
public BlockContinue tryContinue(ParserState state)
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
public void addLine(ParserState state, BasedSequence line)
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
-
isPropagatingLastBlankLine
public boolean isPropagatingLastBlankLine(BlockParser lastMatchedBlockParser)
Description copied from class:AbstractBlockParser
should be overridden in BlockQuote, FencedCode and ListItem- Specified by:
isPropagatingLastBlankLine
in interfaceBlockParser
- Overrides:
isPropagatingLastBlankLine
in classAbstractBlockParser
- Parameters:
lastMatchedBlockParser
- the last matched block parser instance- Returns:
- true if the blank line should be propagated to parent
-
closeBlock
public void closeBlock(ParserState state)
-
-