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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
static class
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HtmlBlockBase
private final Pattern
private BlockContent
private final HtmlDeepParser
private boolean
static final String
static final String
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
private final boolean
-
Constructor Summary
ConstructorsConstructorDescriptionHtmlBlockParser
(DataHolder options, Pattern closingPattern, boolean isComment, HtmlDeepParser deepParser) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLine
(ParserState state, BasedSequence line) Add another line to the blockboolean
canContain
(ParserState state, BlockParser blockParser, Block block) boolean
canInterruptBy
(BlockParserFactory blockParserFactory) Allows block parsers to determine if they can be interrupted by other block parsersvoid
closeBlock
(ParserState state) getBlock()
boolean
Allows block parsers to be interrupted by other block parsersboolean
Allows block parsers to keep indenting spaces for those blocks that are interruptible but don't want indenting spaces removed.tryContinue
(ParserState state) See if the block parser can continue parsing the current blockMethods inherited from class com.vladsch.flexmark.parser.block.AbstractBlockParser
breakOutOnDoubleBlankLine, finalizeClosedBlock, getBlockContent, getDataHolder, isClosed, isContainer, isParagraphParser, isPropagatingLastBlankLine, parseInlines, removeBlankLines
-
Field Details
-
HTML_COMMENT_OPEN
- See Also:
-
HTML_COMMENT_CLOSE
- See Also:
-
block
-
closingPattern
-
deepParser
-
finished
private boolean finished -
-
parseInnerHtmlComments
private final boolean parseInnerHtmlComments -
myHtmlBlockDeepParseNonBlock
private final boolean myHtmlBlockDeepParseNonBlock -
myHtmlBlockDeepParseBlankLineInterrupts
private final boolean myHtmlBlockDeepParseBlankLineInterrupts -
myHtmlBlockDeepParseMarkdownInterruptsClosed
private final boolean myHtmlBlockDeepParseMarkdownInterruptsClosed -
myHtmlBlockDeepParseBlankLineInterruptsPartialTag
private final boolean myHtmlBlockDeepParseBlankLineInterruptsPartialTag -
myHtmlBlockDeepParseIndentedCodeInterrupts
private final boolean myHtmlBlockDeepParseIndentedCodeInterrupts
-
-
Constructor Details
-
HtmlBlockParser
HtmlBlockParser(DataHolder options, Pattern closingPattern, boolean isComment, HtmlDeepParser deepParser)
-
-
Method Details
-
getBlock
- Returns:
- the block parser's block node instance
-
tryContinue
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
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
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
- 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
-