Class FencedCodeBlockParser

java.lang.Object
com.vladsch.flexmark.parser.block.AbstractBlockParser
com.vladsch.flexmark.parser.core.FencedCodeBlockParser
All Implemented Interfaces:
BlockParser

public class FencedCodeBlockParser extends AbstractBlockParser
  • Field Details

    • OPENING_FENCE

      private static final Pattern OPENING_FENCE
    • CLOSING_FENCE

      private static final Pattern CLOSING_FENCE
    • block

      private final FencedCodeBlock block
    • content

      private BlockContent content
    • fenceChar

      private final char fenceChar
    • fenceLength

      private final int fenceLength
    • fenceIndent

      private final int fenceIndent
    • fenceMarkerIndent

      private final int fenceMarkerIndent
    • matchingCloser

      private final boolean matchingCloser
    • codeContentBlock

      private final boolean codeContentBlock
  • Constructor Details

    • FencedCodeBlockParser

      public FencedCodeBlockParser(DataHolder options, char fenceChar, int fenceLength, int fenceIndent, int fenceMarkerIndent)
  • Method Details

    • getBlock

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

      public int getFenceIndent()
    • getFenceMarkerIndent

      public int getFenceMarkerIndent()
    • 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 interface BlockParser
      Overrides:
      addLine in class AbstractBlockParser
      Parameters:
      state - parser state
      line - 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 interface BlockParser
      Overrides:
      isPropagatingLastBlankLine in class AbstractBlockParser
      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)