Package com.vladsch.flexmark.parser.core
Class ParagraphParser
- java.lang.Object
-
- com.vladsch.flexmark.parser.block.AbstractBlockParser
-
- com.vladsch.flexmark.parser.core.ParagraphParser
-
- All Implemented Interfaces:
BlockParser
public class ParagraphParser extends AbstractBlockParser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classParagraphParser.Factory
-
Field Summary
Fields Modifier and Type Field Description private Paragraphblockprivate BlockContentcontent
-
Constructor Summary
Constructors Constructor Description ParagraphParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLine(ParserState state, BasedSequence line)Add another line to the blockvoidcloseBlock(ParserState state)ParagraphgetBlock()BlockContentgetBlockContent()booleanisInterruptible()Allows block parsers to be interrupted by other block parsersbooleanisParagraphParser()voidparseInlines(InlineParser inlineParser)Do inline processing for the block content using the given inline parser interfaceBlockContinuetryContinue(ParserState state)See if the block parser can continue parsing the current block-
Methods inherited from class com.vladsch.flexmark.parser.block.AbstractBlockParser
breakOutOnDoubleBlankLine, canContain, canInterruptBy, finalizeClosedBlock, getDataHolder, isClosed, isContainer, isPropagatingLastBlankLine, isRawText, removeBlankLines
-
-
-
-
Field Detail
-
block
private final Paragraph block
-
content
private BlockContent content
-
-
Method Detail
-
getBlockContent
public BlockContent getBlockContent()
- Specified by:
getBlockContentin interfaceBlockParser- Overrides:
getBlockContentin classAbstractBlockParser- Returns:
- get the currently accumulated block content. May or may not be implemented by any parser except for the
ParagraphParseror one that returns true forBlockParser.isParagraphParser()
-
getBlock
public Paragraph getBlock()
- Returns:
- the block parser's block node instance
-
tryContinue
public BlockContinue tryContinue(ParserState state)
Description copied from interface:BlockParserSee 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:BlockParserAdd another line to the block- Specified by:
addLinein interfaceBlockParser- Overrides:
addLinein classAbstractBlockParser- Parameters:
state- parser stateline- line sequence
-
isParagraphParser
public boolean isParagraphParser()
- Specified by:
isParagraphParserin interfaceBlockParser- Overrides:
isParagraphParserin classAbstractBlockParser- Returns:
- true if this block parser is the paragraph block parser
-
isInterruptible
public boolean isInterruptible()
Description copied from interface:BlockParserAllows block parsers to be interrupted by other block parsers- Specified by:
isInterruptiblein interfaceBlockParser- Overrides:
isInterruptiblein classAbstractBlockParser- Returns:
- true if block starts should be tried when this block parser is active
-
closeBlock
public void closeBlock(ParserState state)
-
parseInlines
public void parseInlines(InlineParser inlineParser)
Description copied from interface:BlockParserDo inline processing for the block content using the given inline parser interface- Specified by:
parseInlinesin interfaceBlockParser- Overrides:
parseInlinesin classAbstractBlockParser- Parameters:
inlineParser- instance of inline parser
-
-