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 classHtmlBlockParser.Factory
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringATTRIBUTEprivate static java.lang.StringATTRIBUTENAMEprivate static java.lang.StringATTRIBUTEVALUEprivate static java.lang.StringATTRIBUTEVALUESPECprivate HtmlBlockblockprivate static java.util.regex.Pattern[][]BLOCK_PATTERNSprivate static java.lang.StringCLOSETAGprivate java.util.regex.PatternclosingPatternprivate BlockContentcontentprivate static java.lang.StringDOUBLEQUOTEDVALUEprivate booleanfinishedprivate static java.lang.StringOPENTAGprivate static java.lang.StringSINGLEQUOTEDVALUEprivate static java.lang.StringTAGNAMEprivate static java.lang.StringUNQUOTEDVALUE
-
Constructor Summary
Constructors Modifier Constructor Description privateHtmlBlockParser(java.util.regex.Pattern closingPattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLine(SourceLine line)Add the part of a line that belongs to this block parser to parse (i.e.voidcloseBlock()BlockgetBlock()BlockContinuetryContinue(ParserState state)-
Methods inherited from class org.commonmark.parser.block.AbstractBlockParser
addSourceSpan, canContain, canHaveLazyContinuationLines, getDefinitions, 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:BlockParserAdd 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:
addLinein interfaceBlockParser- Overrides:
addLinein classAbstractBlockParser
-
closeBlock
public void closeBlock()
- Specified by:
closeBlockin interfaceBlockParser- Overrides:
closeBlockin classAbstractBlockParser
-
-