Class AutolinkInlineParser

java.lang.Object
org.commonmark.internal.inline.AutolinkInlineParser
All Implemented Interfaces:
InlineContentParser

public class AutolinkInlineParser extends Object implements InlineContentParser
Attempt to parse an autolink (URL or email in pointy brackets).
  • Field Details

    • URI

      private static final Pattern URI
    • EMAIL

      private static final Pattern EMAIL
  • Constructor Details

    • AutolinkInlineParser

      public AutolinkInlineParser()
  • Method Details

    • tryParse

      public ParsedInline tryParse(InlineParserState inlineParserState)
      Description copied from interface: InlineContentParser
      Try to parse inline content starting from the current position. Note that the character at the current position is one of InlineContentParserFactory.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:
      tryParse in interface InlineContentParser
      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