Class ListBlockParser

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

public class ListBlockParser extends AbstractBlockParser
  • Field Details

    • myBlock

      private final ListBlock myBlock
    • myOptions

      private final ListOptions myOptions
    • myListData

      private final ListBlockParser.ListData myListData
    • myLastChild

      ListItemParser myLastChild
    • myItemHandledLine

      BasedSequence myItemHandledLine
    • myItemHandledNewListLine

      boolean myItemHandledNewListLine
    • myItemHandledNewItemLine

      boolean myItemHandledNewItemLine
    • myItemHandledSkipActiveLine

      boolean myItemHandledSkipActiveLine
  • Constructor Details

  • Method Details

    • getItemHandledLine

      BasedSequence getItemHandledLine()
    • setItemHandledLine

      void setItemHandledLine(BasedSequence itemHandledLine)
    • setItemHandledNewListLine

      void setItemHandledNewListLine(BasedSequence itemHandledLine)
    • setItemHandledNewItemLine

      void setItemHandledNewItemLine(BasedSequence itemHandledLine)
    • setItemHandledLineSkipActive

      void setItemHandledLineSkipActive(BasedSequence itemHandledLine)
    • getLastChild

      public ListItemParser getLastChild()
    • setLastChild

      public void setLastChild(ListItemParser lastChild)
    • getOptions

      public ListOptions getOptions()
    • getListData

      public ListBlockParser.ListData getListData()
    • getContentIndent

      int getContentIndent()
    • getLastContentIndent

      int getLastContentIndent()
    • 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.
    • 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
    • getBlock

      public ListBlock getBlock()
      Returns:
      the block parser's block node instance
    • setTight

      private void setTight(boolean tight)
    • closeBlock

      public void closeBlock(ParserState state)
    • breakOutOnDoubleBlankLine

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

      private static boolean hasNonItemChildren(ListItem item)
    • finalizeListTight

      private void finalizeListTight(ParserState parserState)
    • parseListMarker

      static ListBlockParser.ListData parseListMarker(ListOptions options, int newItemCodeIndent, ParserState state)
      Parse a list marker and return data on the marker or null.
    • createListBlock

      private static ListBlock createListBlock(Matcher matcher)
    • 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