DefaultEscapedTextParsers

laika.parse.markup.DefaultEscapedTextParsers

Default implementation for parsing escape sequences.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Concrete methods

def escapedText(p: DelimitedText): Parser[String]

Adds support for escape sequences to the specified text parser.

Adds support for escape sequences to the specified text parser.

Value parameters

p

the parser to add support for escape sequences to

Attributes

Returns

a parser for a text span that supports escape sequences

def escapedUntil(char: Char, chars: Char*): Parser[String]

Parses a span of text until one of the specified characters is seen (unless it is escaped), while also processing escaped characters, but no other nested spans. The final character is not included in the result.

Parses a span of text until one of the specified characters is seen (unless it is escaped), while also processing escaped characters, but no other nested spans. The final character is not included in the result.

Attributes

Concrete fields

lazy val escapeSequence: PrefixedParser[String]

Parses an escape sequence (usually a backslash followed by a single char). The characters allowed in an escape sequence might differ between markup languages, therefore custom parser implementations should use this parser as it is always configured correctly for the current host language.

Parses an escape sequence (usually a backslash followed by a single char). The characters allowed in an escape sequence might differ between markup languages, therefore custom parser implementations should use this parser as it is always configured correctly for the current host language.

Attributes

lazy val escapedChar: Parser[String]

Parses a single escape character. In the default implementation any character can be escaped. Sub-traits may override this parser to restrict the number of escapable characters.

Parses a single escape character. In the default implementation any character can be escaped. Sub-traits may override this parser to restrict the number of escapable characters.

Attributes