Interface BlockParser

    • Method Detail

      • isContainer

        boolean isContainer()
        Returns:
        true if the block that is parsed is a container (contains other blocks), or false if it's a leaf.
      • canContain

        boolean canContain​(ParserState state,
                           BlockParser blockParser,
                           Block block)
        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
      • getBlock

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

        BlockContinue tryContinue​(ParserState state)
        See if the block parser can continue parsing the current block
        Parameters:
        state - current parsing state
        Returns:
        block continue instance
      • addLine

        void addLine​(ParserState state,
                     BasedSequence line)
        Add another line to the block
        Parameters:
        state - parser state
        line - line sequence
      • isClosed

        boolean isClosed()
        Returns:
        true if the block is already closed.
      • isPropagatingLastBlankLine

        boolean isPropagatingLastBlankLine​(BlockParser lastMatchedBlockParser)
        Parameters:
        lastMatchedBlockParser - last matched block parser instance
        Returns:
        true if the last blank line status should be propagated to parent blocks
      • breakOutOnDoubleBlankLine

        boolean breakOutOnDoubleBlankLine()
        Returns:
        true if Double blank line should finalize this block parser and its children and reset to parent
      • isParagraphParser

        boolean isParagraphParser()
        Returns:
        true if this block parser is the paragraph block parser
      • finalizeClosedBlock

        void finalizeClosedBlock()
        Used to clean up and prepare for the next parsing run of the AbstractBlockParser for internal parser house keeping not for BlockParser implementors
      • parseInlines

        void parseInlines​(InlineParser inlineParser)
        Do inline processing for the block content using the given inline parser interface
        Parameters:
        inlineParser - instance of inline parser
      • isInterruptible

        boolean isInterruptible()
        Allows block parsers to be interrupted by other block parsers
        Returns:
        true if block starts should be tried when this block parser is active
      • isRawText

        boolean isRawText()
        Allows block parsers to keep indenting spaces for those blocks that are interruptible but don't want indenting spaces removed.
        Returns:
        true if block wants to keep indenting spaces
      • canInterruptBy

        boolean canInterruptBy​(BlockParserFactory blockParserFactory)
        Allows block parsers to determine if they can be interrupted by other block parsers
        Parameters:
        blockParserFactory - interrupting block parser
        Returns:
        true if can interrupt.