Class HtmlBlockParser

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

public class HtmlBlockParser extends AbstractBlockParser
  • Field Details

    • HTML_COMMENT_OPEN

      public static final String HTML_COMMENT_OPEN
      See Also:
    • HTML_COMMENT_CLOSE

      public static final String HTML_COMMENT_CLOSE
      See Also:
    • block

      private final HtmlBlockBase block
    • closingPattern

      private final Pattern closingPattern
    • deepParser

      private final HtmlDeepParser deepParser
    • finished

      private boolean finished
    • content

      private BlockContent content
    • parseInnerHtmlComments

      private final boolean parseInnerHtmlComments
    • myHtmlBlockDeepParseNonBlock

      private final boolean myHtmlBlockDeepParseNonBlock
    • myHtmlBlockDeepParseBlankLineInterrupts

      private final boolean myHtmlBlockDeepParseBlankLineInterrupts
    • myHtmlBlockDeepParseMarkdownInterruptsClosed

      private final boolean myHtmlBlockDeepParseMarkdownInterruptsClosed
    • myHtmlBlockDeepParseBlankLineInterruptsPartialTag

      private final boolean myHtmlBlockDeepParseBlankLineInterruptsPartialTag
    • myHtmlBlockDeepParseIndentedCodeInterrupts

      private final boolean myHtmlBlockDeepParseIndentedCodeInterrupts
  • Constructor Details

  • Method Details

    • 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 interface BlockParser
      Overrides:
      addLine in class AbstractBlockParser
      Parameters:
      state - parser state
      line - line sequence
    • canInterruptBy

      public boolean canInterruptBy(BlockParserFactory blockParserFactory)
      Description copied from interface: BlockParser
      Allows block parsers to determine if they can be interrupted by other block parsers
      Specified by:
      canInterruptBy in interface BlockParser
      Overrides:
      canInterruptBy in class AbstractBlockParser
      Parameters:
      blockParserFactory - interrupting block parser
      Returns:
      true if can interrupt.
    • canContain

      public boolean canContain(ParserState state, BlockParser blockParser, Block block)
      Specified by:
      canContain in interface BlockParser
      Overrides:
      canContain in class AbstractBlockParser
      Parameters:
      state - parser state
      blockParser - block parser
      block - new block being started @return true if this block parser's block can contain the given block type, false if it cannot
    • isInterruptible

      public boolean isInterruptible()
      Description copied from interface: BlockParser
      Allows block parsers to be interrupted by other block parsers
      Specified by:
      isInterruptible in interface BlockParser
      Overrides:
      isInterruptible in class AbstractBlockParser
      Returns:
      true if block starts should be tried when this block parser is active
    • isRawText

      public boolean isRawText()
      Description copied from interface: BlockParser
      Allows block parsers to keep indenting spaces for those blocks that are interruptible but don't want indenting spaces removed.
      Specified by:
      isRawText in interface BlockParser
      Overrides:
      isRawText in class AbstractBlockParser
      Returns:
      true if block wants to keep indenting spaces
    • closeBlock

      public void closeBlock(ParserState state)