Class AbstractBlockParser

    • Constructor Detail

      • AbstractBlockParser

        public AbstractBlockParser()
    • Method Detail

      • isClosed

        public boolean isClosed()
        Specified by:
        isClosed in interface BlockParser
        Returns:
        true if the block is already closed.
      • isContainer

        public boolean isContainer()
        Specified by:
        isContainer in interface BlockParser
        Returns:
        true if the block that is parsed is a container (contains other blocks), or false if it's a leaf.
      • 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
        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
        Returns:
        true if block wants to keep indenting spaces
      • canContain

        public boolean canContain​(ParserState state,
                                  BlockParser blockParser,
                                  Block block)
        Specified by:
        canContain in interface BlockParser
        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
      • isParagraphParser

        public boolean isParagraphParser()
        Specified by:
        isParagraphParser in interface BlockParser
        Returns:
        true if this block parser is the paragraph block parser
      • isPropagatingLastBlankLine

        public boolean isPropagatingLastBlankLine​(BlockParser lastMatchedBlockParser)
        should be overridden in BlockQuote, FencedCode and ListItem
        Specified by:
        isPropagatingLastBlankLine in interface BlockParser
        Parameters:
        lastMatchedBlockParser - the last matched block parser instance
        Returns:
        true if the blank line should be propagated to parent
      • 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
        Parameters:
        inlineParser - instance of inline parser
      • breakOutOnDoubleBlankLine

        public boolean breakOutOnDoubleBlankLine()
        Specified by:
        breakOutOnDoubleBlankLine in interface BlockParser
        Returns:
        true if Double blank line should finalize this block parser and its children and reset to parent
      • finalizeClosedBlock

        public final void finalizeClosedBlock()
        Description copied from interface: BlockParser
        Used to clean up and prepare for the next parsing run of the AbstractBlockParser for internal parser house keeping not for BlockParser implementors
        Specified by:
        finalizeClosedBlock in interface BlockParser
      • 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
        Parameters:
        blockParserFactory - interrupting block parser
        Returns:
        true if can interrupt.
      • removeBlankLines

        public void removeBlankLines()