Package org.commonmark.internal.inline
Class HtmlInlineParser
- java.lang.Object
-
- org.commonmark.internal.inline.HtmlInlineParser
-
- All Implemented Interfaces:
InlineContentParser
public class HtmlInlineParser extends java.lang.Object implements InlineContentParser
Attempt to parse inline HTML.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHtmlInlineParser.Factory
-
Field Summary
Fields Modifier and Type Field Description private static AsciiMatcherasciiLetterprivate static AsciiMatcherattributeContinueprivate static AsciiMatcherattributeStartprivate static AsciiMatcherattributeValueEndprivate static AsciiMatchertagNameContinueprivate static AsciiMatchertagNameStart
-
Constructor Summary
Constructors Constructor Description HtmlInlineParser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static ParsedInlinehtmlInline(Position start, Scanner scanner)private static booleantryCdata(Scanner scanner)private static booleantryClosingTag(Scanner scanner)private static booleantryComment(Scanner scanner)private static booleantryDeclaration(Scanner scanner)private static booleantryOpenTag(Scanner scanner)ParsedInlinetryParse(InlineParserState inlineParserState)Try to parse inline content starting from the current position.private static booleantryProcessingInstruction(Scanner scanner)
-
-
-
Field Detail
-
asciiLetter
private static final AsciiMatcher asciiLetter
-
tagNameStart
private static final AsciiMatcher tagNameStart
-
tagNameContinue
private static final AsciiMatcher tagNameContinue
-
attributeStart
private static final AsciiMatcher attributeStart
-
attributeContinue
private static final AsciiMatcher attributeContinue
-
attributeValueEnd
private static final AsciiMatcher attributeValueEnd
-
-
Method Detail
-
tryParse
public ParsedInline tryParse(InlineParserState inlineParserState)
Description copied from interface:InlineContentParserTry to parse inline content starting from the current position. Note that the character at the current position is one ofInlineContentParserFactory.getTriggerCharacters()of the factory that created this parser.For a given inline content snippet that is being parsed, this method can be called multiple times: each time a trigger character is encountered.
- Specified by:
tryParsein interfaceInlineContentParser- Parameters:
inlineParserState- the current state of the inline parser- Returns:
- the result of parsing; can indicate that this parser is not interested, or that parsing was successful
-
htmlInline
private static ParsedInline htmlInline(Position start, Scanner scanner)
-
tryOpenTag
private static boolean tryOpenTag(Scanner scanner)
-
tryClosingTag
private static boolean tryClosingTag(Scanner scanner)
-
tryProcessingInstruction
private static boolean tryProcessingInstruction(Scanner scanner)
-
tryComment
private static boolean tryComment(Scanner scanner)
-
tryCdata
private static boolean tryCdata(Scanner scanner)
-
tryDeclaration
private static boolean tryDeclaration(Scanner scanner)
-
-