Package org.commonmark.parser.beta
Interface InlineContentParser
-
- All Known Implementing Classes:
AutolinkInlineParser
,BackslashInlineParser
,BackticksInlineParser
,EntityInlineParser
,HtmlInlineParser
public interface InlineContentParser
Parser for a type of inline content. Registered via aInlineContentParserFactory
and created by itscreate
method. The lifetime of this is tied to each inline content snippet that is parsed, as a new instance is created for each.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ParsedInline
tryParse(InlineParserState inlineParserState)
Try to parse inline content starting from the current position.
-
-
-
Method Detail
-
tryParse
ParsedInline tryParse(InlineParserState inlineParserState)
Try 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.
- 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
-
-