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 a
InlineContentParserFactory
and created by its
create
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
Modifier and TypeMethodDescriptiontryParse
(InlineParserState inlineParserState) Try to parse inline content starting from the current position.
-
Method Details
-
tryParse
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
-