Class YamlFrontMatterBlockParser
- java.lang.Object
-
- com.vladsch.flexmark.parser.block.AbstractBlockParser
-
- com.vladsch.flexmark.ext.yaml.front.matter.internal.YamlFrontMatterBlockParser
-
- All Implemented Interfaces:
BlockParser
public class YamlFrontMatterBlockParser extends AbstractBlockParser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classYamlFrontMatterBlockParser.BlockFactorystatic classYamlFrontMatterBlockParser.Factory
-
Field Summary
Fields Modifier and Type Field Description private YamlFrontMatterBlockblockprivate BlockContentcontentprivate BasedSequencecurrentKeyprivate java.util.List<BasedSequence>currentValuesprivate booleaninLiteralprivate booleaninYAMLBlockprivate static java.util.regex.PatternREGEX_BEGINprivate static java.util.regex.PatternREGEX_ENDprivate static java.util.regex.PatternREGEX_METADATAprivate static java.util.regex.PatternREGEX_METADATA_LISTprivate static java.util.regex.PatternREGEX_METADATA_LITERAL
-
Constructor Summary
Constructors Constructor Description YamlFrontMatterBlockParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLine(ParserState state, BasedSequence line)Add another line to the blockvoidcloseBlock(ParserState state)BlockgetBlock()booleanisContainer()voidparseInlines(InlineParser inlineParser)Do inline processing for the block content using the given inline parser interfaceBlockContinuetryContinue(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, isInterruptible, isParagraphParser, isPropagatingLastBlankLine, isRawText, removeBlankLines
-
-
-
-
Field Detail
-
REGEX_METADATA
private static final java.util.regex.Pattern REGEX_METADATA
-
REGEX_METADATA_LIST
private static final java.util.regex.Pattern REGEX_METADATA_LIST
-
REGEX_METADATA_LITERAL
private static final java.util.regex.Pattern REGEX_METADATA_LITERAL
-
REGEX_BEGIN
private static final java.util.regex.Pattern REGEX_BEGIN
-
REGEX_END
private static final java.util.regex.Pattern REGEX_END
-
inYAMLBlock
private boolean inYAMLBlock
-
inLiteral
private boolean inLiteral
-
currentKey
private BasedSequence currentKey
-
currentValues
private java.util.List<BasedSequence> currentValues
-
block
private YamlFrontMatterBlock block
-
content
private BlockContent content
-
-
Method Detail
-
getBlock
public Block getBlock()
- Returns:
- the block parser's block node instance
-
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
public void addLine(ParserState state, BasedSequence line)
Description copied from interface:BlockParserAdd another line to the block- Specified by:
addLinein interfaceBlockParser- Overrides:
addLinein classAbstractBlockParser- Parameters:
state- parser stateline- line sequence
-
closeBlock
public void closeBlock(ParserState state)
-
tryContinue
public BlockContinue tryContinue(ParserState state)
Description copied from interface:BlockParserSee if the block parser can continue parsing the current block- Parameters:
state- current parsing state- Returns:
- block continue instance
-
parseInlines
public void parseInlines(InlineParser inlineParser)
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
-
-