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
  • Field Details

    • REGEX_METADATA

      private static final Pattern REGEX_METADATA
    • REGEX_METADATA_LIST

      private static final Pattern REGEX_METADATA_LIST
    • REGEX_METADATA_LITERAL

      private static final Pattern REGEX_METADATA_LITERAL
    • REGEX_BEGIN

      private static final Pattern REGEX_BEGIN
    • REGEX_END

      private static final Pattern REGEX_END
    • inYAMLBlock

      private boolean inYAMLBlock
    • inLiteral

      private boolean inLiteral
    • currentKey

      private BasedSequence currentKey
    • currentValues

      private List<BasedSequence> currentValues
    • block

      private YamlFrontMatterBlock block
    • content

      private BlockContent content
  • Constructor Details

    • YamlFrontMatterBlockParser

      public YamlFrontMatterBlockParser()
  • Method Details

    • getBlock

      public Block getBlock()
      Returns:
      the block parser's block node instance
    • isContainer

      public boolean isContainer()
      Specified by:
      isContainer in interface BlockParser
      Overrides:
      isContainer in class AbstractBlockParser
      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: BlockParser
      Add another line to the block
      Specified by:
      addLine in interface BlockParser
      Overrides:
      addLine in class AbstractBlockParser
      Parameters:
      state - parser state
      line - line sequence
    • closeBlock

      public void closeBlock(ParserState state)
    • 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
    • parseInlines

      public void parseInlines(InlineParser inlineParser)
      Description copied from interface: BlockParser
      Do inline processing for the block content using the given inline parser interface
      Specified by:
      parseInlines in interface BlockParser
      Overrides:
      parseInlines in class AbstractBlockParser
      Parameters:
      inlineParser - instance of inline parser