Class YamlFrontMatterBlockParser
- java.lang.Object
-
- org.commonmark.parser.block.AbstractBlockParser
-
- org.commonmark.ext.front.matter.internal.YamlFrontMatterBlockParser
-
- All Implemented Interfaces:
BlockParser
public class YamlFrontMatterBlockParser extends AbstractBlockParser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classYamlFrontMatterBlockParser.Factory
-
Field Summary
Fields Modifier and Type Field Description private YamlFrontMatterBlockblockprivate java.lang.StringcurrentKeyprivate java.util.List<java.lang.String>currentValuesprivate booleaninLiteralprivate 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 Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLine(SourceLine line)Add the part of a line that belongs to this block parser to parse (i.e.BlockgetBlock()voidparseInlines(InlineParser inlineParser)private static java.lang.StringparseString(java.lang.String s)BlockContinuetryContinue(ParserState parserState)-
Methods inherited from class org.commonmark.parser.block.AbstractBlockParser
addSourceSpan, canContain, canHaveLazyContinuationLines, closeBlock, getDefinitions, isContainer
-
-
-
-
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
-
inLiteral
private boolean inLiteral
-
currentKey
private java.lang.String currentKey
-
currentValues
private java.util.List<java.lang.String> currentValues
-
block
private YamlFrontMatterBlock block
-
-
Method Detail
-
getBlock
public Block getBlock()
-
addLine
public void addLine(SourceLine line)
Description copied from interface:BlockParserAdd the part of a line that belongs to this block parser to parse (i.e. without any container block markers). Note that the line will only include aSourceLine.getSourceSpan()if source spans are enabled for inlines.- Specified by:
addLinein interfaceBlockParser- Overrides:
addLinein classAbstractBlockParser
-
tryContinue
public BlockContinue tryContinue(ParserState parserState)
-
parseInlines
public void parseInlines(InlineParser inlineParser)
- Specified by:
parseInlinesin interfaceBlockParser- Overrides:
parseInlinesin classAbstractBlockParser
-
parseString
private static java.lang.String parseString(java.lang.String s)
-
-