Package com.vladsch.flexmark.parser.core
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HtmlBlockParser.Factory
-
Field Summary
Fields Modifier and Type Field Description static String
HTML_COMMENT_CLOSE
static String
HTML_COMMENT_OPEN
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLine(ParserState state, com.vladsch.flexmark.util.sequence.BasedSequence line)
Add another line to the blockboolean
canContain(ParserState state, BlockParser blockParser, com.vladsch.flexmark.util.ast.Block block)
boolean
canInterruptBy(BlockParserFactory blockParserFactory)
Allows block parsers to determine if they can be interrupted by other block parsersvoid
closeBlock(ParserState state)
com.vladsch.flexmark.util.ast.Block
getBlock()
boolean
isInterruptible()
Allows block parsers to be interrupted by other block parsersboolean
isRawText()
Allows block parsers to keep indenting spaces for those blocks that are interruptible but don't want indenting spaces removed.BlockContinue
tryContinue(ParserState state)
See if the block parser can continue parsing the current block-
Methods inherited from class com.vladsch.flexmark.parser.block.AbstractBlockParser
breakOutOnDoubleBlankLine, finalizeClosedBlock, getBlockContent, getDataHolder, isClosed, isContainer, isParagraphParser, isPropagatingLastBlankLine, parseInlines, removeBlankLines
-
-
-
-
Field Detail
-
HTML_COMMENT_OPEN
public static final String HTML_COMMENT_OPEN
- See Also:
- Constant Field Values
-
HTML_COMMENT_CLOSE
public static final String HTML_COMMENT_CLOSE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getBlock
public com.vladsch.flexmark.util.ast.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, com.vladsch.flexmark.util.sequence.BasedSequence line)
Description copied from interface:BlockParser
Add another line to the block- Specified by:
addLine
in interfaceBlockParser
- Overrides:
addLine
in classAbstractBlockParser
- Parameters:
state
- parser stateline
- 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 interfaceBlockParser
- Overrides:
canInterruptBy
in classAbstractBlockParser
- Parameters:
blockParserFactory
- interrupting block parser- Returns:
- true if can interrupt.
-
canContain
public boolean canContain(ParserState state, BlockParser blockParser, com.vladsch.flexmark.util.ast.Block block)
- Specified by:
canContain
in interfaceBlockParser
- Overrides:
canContain
in classAbstractBlockParser
- Parameters:
state
- parser stateblockParser
- block parserblock
- 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 interfaceBlockParser
- Overrides:
isInterruptible
in classAbstractBlockParser
- 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 interfaceBlockParser
- Overrides:
isRawText
in classAbstractBlockParser
- Returns:
- true if block wants to keep indenting spaces
-
closeBlock
public void closeBlock(ParserState state)
-
-