Class BackslashInlineParser

  • All Implemented Interfaces:
    InlineContentParser

    public class BackslashInlineParser
    extends java.lang.Object
    implements InlineContentParser
    Parse a backslash-escaped special character, adding either the escaped character, a hard line break (if the backslash is followed by a newline), or a literal backslash to the block's children.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.regex.Pattern ESCAPABLE  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ParsedInline tryParse​(InlineParserState inlineParserState)
      Try to parse inline content starting from the current position.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ESCAPABLE

        private static final java.util.regex.Pattern ESCAPABLE
    • Constructor Detail

      • BackslashInlineParser

        public BackslashInlineParser()
    • Method Detail

      • 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