Package org.commonmark.internal
Class HtmlBlockParser
- java.lang.Object
-
- org.commonmark.parser.block.AbstractBlockParser
-
- org.commonmark.internal.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 private static java.lang.String
ATTRIBUTE
private static java.lang.String
ATTRIBUTENAME
private static java.lang.String
ATTRIBUTEVALUE
private static java.lang.String
ATTRIBUTEVALUESPEC
private HtmlBlock
block
private static java.util.regex.Pattern[][]
BLOCK_PATTERNS
private static java.lang.String
CLOSETAG
private java.util.regex.Pattern
closingPattern
private BlockContent
content
private static java.lang.String
DOUBLEQUOTEDVALUE
private boolean
finished
private static java.lang.String
OPENTAG
private static java.lang.String
SINGLEQUOTEDVALUE
private static java.lang.String
TAGNAME
private static java.lang.String
UNQUOTEDVALUE
-
Constructor Summary
Constructors Modifier Constructor Description private
HtmlBlockParser(java.util.regex.Pattern closingPattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLine(SourceLine line)
Add the part of a line that belongs to this block parser to parse (i.e.void
closeBlock()
Block
getBlock()
BlockContinue
tryContinue(ParserState state)
-
Methods inherited from class org.commonmark.parser.block.AbstractBlockParser
addSourceSpan, canContain, canHaveLazyContinuationLines, isContainer, parseInlines
-
-
-
-
Field Detail
-
TAGNAME
private static final java.lang.String TAGNAME
- See Also:
- Constant Field Values
-
ATTRIBUTENAME
private static final java.lang.String ATTRIBUTENAME
- See Also:
- Constant Field Values
-
UNQUOTEDVALUE
private static final java.lang.String UNQUOTEDVALUE
- See Also:
- Constant Field Values
-
SINGLEQUOTEDVALUE
private static final java.lang.String SINGLEQUOTEDVALUE
- See Also:
- Constant Field Values
-
DOUBLEQUOTEDVALUE
private static final java.lang.String DOUBLEQUOTEDVALUE
- See Also:
- Constant Field Values
-
ATTRIBUTEVALUE
private static final java.lang.String ATTRIBUTEVALUE
- See Also:
- Constant Field Values
-
ATTRIBUTEVALUESPEC
private static final java.lang.String ATTRIBUTEVALUESPEC
- See Also:
- Constant Field Values
-
ATTRIBUTE
private static final java.lang.String ATTRIBUTE
- See Also:
- Constant Field Values
-
OPENTAG
private static final java.lang.String OPENTAG
- See Also:
- Constant Field Values
-
CLOSETAG
private static final java.lang.String CLOSETAG
- See Also:
- Constant Field Values
-
BLOCK_PATTERNS
private static final java.util.regex.Pattern[][] BLOCK_PATTERNS
-
block
private final HtmlBlock block
-
closingPattern
private final java.util.regex.Pattern closingPattern
-
finished
private boolean finished
-
content
private BlockContent content
-
-
Method Detail
-
getBlock
public Block getBlock()
-
tryContinue
public BlockContinue tryContinue(ParserState state)
-
addLine
public void addLine(SourceLine line)
Description copied from interface:BlockParser
Add the part of a line that belongs to this block parser to parse (i.e. without any container block markers). Note that the line will only include aSourceLine.getSourceSpan()
if source spans are enabled for inlines.- Specified by:
addLine
in interfaceBlockParser
- Overrides:
addLine
in classAbstractBlockParser
-
closeBlock
public void closeBlock()
- Specified by:
closeBlock
in interfaceBlockParser
- Overrides:
closeBlock
in classAbstractBlockParser
-
-