Trait

laika.parse.markdown.html

HTMLParsers

Related Doc: package html

Permalink

trait HTMLParsers extends InlineParsers with BlockParsers

Parses verbatim HTML elements which may interleave with standard Markdown markup. Extends the Markdown block and inline parsers, overriding several of their parsers to add the HTML functionality.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HTMLParsers
  2. BlockParsers
  3. BlockParsers
  4. InlineParsers
  5. InlineParsers
  6. MarkupParsers
  7. BaseParsers
  8. RegexParsers
  9. Parsers
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Elem = Char

    Permalink
    Definition Classes
    RegexParsers → Parsers
  2. case class Error extends NoSuccess with Product with Serializable

    Permalink
    Definition Classes
    Parsers
  3. case class Failure extends NoSuccess with Product with Serializable

    Permalink
    Definition Classes
    Parsers
  4. case class IndentedBlock(nestLevel: Int, minIndent: Int, lines: List[String]) extends Product with Serializable

    Permalink
    Definition Classes
    BlockParsers
  5. type Input = Reader[Elem]

    Permalink
    Definition Classes
    Parsers
  6. class MarkupParserException extends RuntimeException

    Permalink

    Exception thrown when parsing a text markup document or fragment fails.

    Exception thrown when parsing a text markup document or fragment fails. This can only happen due to a bug in this library, as the behaviour of the parser is to treat all unknown or malformed markup as regular text and always succeed. The result property holds the NoSuccess instance that caused the failure.

    Definition Classes
    MarkupParsers
  7. class NestedCharSequenceReader extends CharSequenceReader

    Permalink

    Reader implementation that keeps the current nest level in case of recursive parsing of block-level elements.

    Reader implementation that keeps the current nest level in case of recursive parsing of block-level elements.

    Definition Classes
    BlockParsers
  8. sealed abstract class NoSuccess extends ParseResult[Nothing]

    Permalink
    Definition Classes
    Parsers
  9. trait OnceParser[+T] extends Parser[T]

    Permalink
    Definition Classes
    Parsers
  10. sealed abstract class ParseResult[+T] extends AnyRef

    Permalink
    Definition Classes
    Parsers
  11. abstract class Parser[+T] extends (Input) ⇒ ParseResult[T]

    Permalink
    Definition Classes
    Parsers
  12. implicit class ParserOps[A] extends AnyRef

    Permalink

    Provides additional combinator methods to parsers via implicit conversion.

    Provides additional combinator methods to parsers via implicit conversion.

    Definition Classes
    BaseParsers
  13. trait ResultBuilder[Elem, +To] extends AnyRef

    Permalink

    Abstracts the internal process of building up the result of an inline parser.

    Abstracts the internal process of building up the result of an inline parser. Since some inline parser produce a tree of nested spans whereas others may only produce a text result, they often require the same logic in how they deal with nested constructs.

    Definition Classes
    InlineParsers
  14. class SpanBuilder extends ResultBuilder[Span, List[Span]]

    Permalink

    ResultBuilder that produces a list of spans.

    ResultBuilder that produces a list of spans.

    Definition Classes
    InlineParsers
  15. case class Success[+T] extends ParseResult[T] with Product with Serializable

    Permalink
    Definition Classes
    Parsers
  16. class TextBuilder extends ResultBuilder[String, String]

    Permalink

    ResultBuilder that produces a String.

    ResultBuilder that produces a String.

    Definition Classes
    InlineParsers
  17. class TextParser extends Parser[String]

    Permalink

    API for specifying further constraints on the parsers provided by this base trait.

    API for specifying further constraints on the parsers provided by this base trait.

    For reading 3 or more '*' or '+'characters for example the constraint could be specified as follows:

    anyOf('*','+') min 3
    Definition Classes
    MarkupParsers
  18. implicit class TryOps[A] extends AnyRef

    Permalink

    Provides additional methods to Try via implicit conversion.

    Provides additional methods to Try via implicit conversion.

    Definition Classes
    BaseParsers
  19. case class ~[+a, +b] extends Product with Serializable

    Permalink
    Definition Classes
    Parsers

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object NoSuccess

    Permalink
    Definition Classes
    Parsers
  5. def OnceParser[T](f: (Input) ⇒ ParseResult[T]): Parser[T] with OnceParser[T]

    Permalink
    Definition Classes
    Parsers
  6. def Parser[T](f: (Input) ⇒ ParseResult[T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  7. def accept[U](expected: String, f: PartialFunction[Elem, U]): Parser[U]

    Permalink
    Definition Classes
    Parsers
  8. def accept[ES](es: ES)(implicit arg0: (ES) ⇒ List[Elem]): Parser[List[Elem]]

    Permalink
    Definition Classes
    Parsers
  9. implicit def accept(e: Elem): Parser[Elem]

    Permalink
    Definition Classes
    Parsers
  10. def acceptIf(p: (Elem) ⇒ Boolean)(err: (Elem) ⇒ String): Parser[Elem]

    Permalink
    Definition Classes
    Parsers
  11. def acceptMatch[U](expected: String, f: PartialFunction[Elem, U]): Parser[U]

    Permalink
    Definition Classes
    Parsers
  12. def acceptSeq[ES](es: ES)(implicit arg0: (ES) ⇒ Iterable[Elem]): Parser[List[Elem]]

    Permalink
    Definition Classes
    Parsers
  13. val any: TextParser

    Permalink

    Consumes any kind of input, always succeeds.

    Consumes any kind of input, always succeeds. This parser would consume the entire input unless a max constraint is specified.

    Definition Classes
    MarkupParsers
  14. def anyBut(chars: Char*): TextParser

    Permalink

    Consumes any number of consecutive characters that are not one of the specified characters.

    Consumes any number of consecutive characters that are not one of the specified characters. Always succeeds unless a minimum number of required matches is specified.

    Definition Classes
    MarkupParsers
  15. def anyIn(ranges: Traversable[Char]*): TextParser

    Permalink

    Consumes any number of consecutive characters that are in one of the specified character ranges.

    Consumes any number of consecutive characters that are in one of the specified character ranges. Always succeeds unless a minimum number of required matches is specified.

    Definition Classes
    MarkupParsers
  16. def anyOf(chars: Char*): TextParser

    Permalink

    Consumes any number of consecutive occurrences of the specified characters.

    Consumes any number of consecutive occurrences of the specified characters. Always succeeds unless a minimum number of required matches is specified.

    Definition Classes
    MarkupParsers
  17. def anyUntil(until: ⇒ Parser[Any]): TextParser

    Permalink

    Consumes any number of characters for which the specified parser fails on the corresponding offset.

    Consumes any number of characters for which the specified parser fails on the corresponding offset. This parser fails if the end of input is reached without the specified parser ever succeeding or if the parser causes an Error result instead of a plain Failure or Success. Further constraints like minimum or maximum number of required matching characters can be specified through the API of the returned TextParser instance.

    Definition Classes
    MarkupParsers
  18. def anyUntil(chars: Char*): TextParser

    Permalink

    Consumes any number of consecutive characters that are not one of the specified characters.

    Consumes any number of consecutive characters that are not one of the specified characters.

    This parser is identical to the anyBut parser except for two differences: this parser fails if it reaches the end of the input without seeing any of the specified characters and it also consumes this final character, without adding it to the result. This parser is usually used when a construct like a span enclosed between two characters needs to be parsed.

    Definition Classes
    MarkupParsers
  19. def anyWhile(p: (Char) ⇒ Boolean): TextParser

    Permalink

    Consumes any number of consecutive characters which satisfy the specified predicate.

    Consumes any number of consecutive characters which satisfy the specified predicate. Always succeeds unless a minimum number of required matches is specified.

    Definition Classes
    MarkupParsers
  20. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  21. val atStart: Parser[Unit]

    Permalink

    Succeeds at the start of the input.

    Succeeds at the start of the input.

    Definition Classes
    MarkupParsers
  22. lazy val atxHeader: Parser[Header]

    Permalink

    Parses an ATX header, a line that starts with 1 to 6 '#' characters, with the number of hash characters corresponding to the level of the header.

    Parses an ATX header, a line that starts with 1 to 6 '#' characters, with the number of hash characters corresponding to the level of the header. Markdown also allows to decorate the line with trailing '#' characters which this parser will remove.

    Definition Classes
    BlockParsers
  23. val blankLine: Parser[String]

    Permalink

    Parses a blank line from the current input offset (which may not be at the start of the line).

    Parses a blank line from the current input offset (which may not be at the start of the line). Fails for lines that contain any non-whitespace character. Does always produce an empty string as the result, discarding any whitespace characters found in the line.

    Since it also succeeds at the end of the input it should never be used in the form of (blankLine *) or (blankLine +). Use the blankLines parser instead in these cases.

    Definition Classes
    BlockParsers
  24. val blankLines: Parser[List[String]]

    Permalink

    Parses one or more blanklines, producing a list of empty strings corresponding to the number of blank lines consumed.

    Parses one or more blanklines, producing a list of empty strings corresponding to the number of blank lines consumed.

    Definition Classes
    BlockParsers
  25. def block(firstLinePrefix: Parser[Any], linePrefix: ⇒ Parser[Any], nextBlockPrefix: ⇒ Parser[Any]): Parser[List[String]]

    Permalink

    Parses a full block based on the specified helper parsers.

    Parses a full block based on the specified helper parsers.

    firstLinePrefix

    parser that recognizes the start of the first line of this block

    linePrefix

    parser that recognizes the start of subsequent lines that still belong to the same block

    nextBlockPrefix

    parser that recognizes whether a line after one or more blank lines still belongs to the same block

    Definition Classes
    BlockParsers
  26. def blockList(p: ⇒ Parser[Block]): Parser[List[Block]]

    Permalink

    Builds a parser for a list of blocks based on the parser for a single block.

    Builds a parser for a list of blocks based on the parser for a single block.

    Definition Classes
    BlockParsers
  27. def bulletList: Parser[BulletList]

    Permalink

    Parses a bullet list, called "unordered list" in the Markdown syntax description.

    Parses a bullet list, called "unordered list" in the Markdown syntax description.

    Definition Classes
    BlockParsers
  28. val bulletListItemStart: Parser[String]

    Permalink

    Parses the start of a bullet list item.

    Parses the start of a bullet list item.

    Definition Classes
    BlockParsers
  29. def chainl1[T, U](first: ⇒ Parser[T], p: ⇒ Parser[U], q: ⇒ Parser[(T, U) ⇒ T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  30. def chainl1[T](p: ⇒ Parser[T], q: ⇒ Parser[(T, T) ⇒ T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  31. def chainr1[T, U](p: ⇒ Parser[T], q: ⇒ Parser[(T, U) ⇒ U], combine: (T, U) ⇒ U, first: U): Parser[U]

    Permalink
    Definition Classes
    Parsers
  32. implicit def charToTraversalble(char: Char): Traversable[Char]

    Permalink

    Implicit conversion that allows to pass a single character to the range-based anyIn parser.

    Implicit conversion that allows to pass a single character to the range-based anyIn parser.

    Definition Classes
    MarkupParsers
  33. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. def commit[T](p: ⇒ Parser[T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  35. def config(path: Path): Parser[Either[InvalidBlock, Config]]

    Permalink
    Definition Classes
    BlockParsers
  36. def elem(e: Elem): Parser[Elem]

    Permalink
    Definition Classes
    Parsers
  37. def elem(kind: String, p: (Elem) ⇒ Boolean): Parser[Elem]

    Permalink
    Definition Classes
    Parsers
  38. def em(char: Char): Parser[Emphasized]

    Permalink

    Parses a span of emphasized text enclosed by one occurrence of the specified character.

    Parses a span of emphasized text enclosed by one occurrence of the specified character.

    Definition Classes
    InlineParsers
  39. def enclosedByDoubleChar(char: Char): Parser[List[Span]]

    Permalink

    Parses a span enclosed by two consecutive occurrences of the specified character.

    Parses a span enclosed by two consecutive occurrences of the specified character. Recursively parses nested spans, too.

    Definition Classes
    InlineParsers
  40. def enclosedBySingleChar(char: Char): Parser[List[Span]]

    Permalink

    Parses a span enclosed by a single occurrence of the specified character.

    Parses a span enclosed by a single occurrence of the specified character. Recursively parses nested spans, too.

    Definition Classes
    InlineParsers
  41. def enumList: Parser[EnumList]

    Permalink

    Parses an enumerated list, called "ordered list" in the Markdown syntax description.

    Parses an enumerated list, called "ordered list" in the Markdown syntax description.

    Definition Classes
    BlockParsers
  42. val enumListItemStart: Parser[String]

    Permalink

    Parses the start of an enumerated list item.

    Parses the start of an enumerated list item.

    Definition Classes
    BlockParsers
  43. def eof: Parser[String]

    Permalink

    Succeeds at the end of the input.

    Succeeds at the end of the input.

    Definition Classes
    MarkupParsers
  44. def eol: Parser[String]

    Permalink

    Succeeds at the end of a line, including the end of the input.

    Succeeds at the end of a line, including the end of the input. Produces an empty string as a result and consumes any new line characters.

    Definition Classes
    MarkupParsers
  45. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  46. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  47. def err(msg: String): Parser[Nothing]

    Permalink
    Definition Classes
    Parsers
  48. lazy val escapedChar: TextParser

    Permalink

    Parses a single escaped character, only recognizing the characters the Markdown syntax document specifies as escapable.

    Parses a single escaped character, only recognizing the characters the Markdown syntax document specifies as escapable.

    Note: escaping > is not mandated by the official syntax description, but by the official test suite.

    Definition Classes
    InlineParsersInlineParsers
  49. def escapedText(p: TextParser): Parser[String]

    Permalink

    Adds support for escape sequences to the specified text parser.

    Adds support for escape sequences to the specified text parser.

    p

    the parser to add support for escape sequences to

    returns

    a parser for a text span that supports escape sequences

    Definition Classes
    InlineParsers
  50. def escapedUntil(char: Char*): Parser[String]

    Permalink

    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.

    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.

    char

    the character that signals the end of the text span

    returns

    a parser for a text span that supports escape sequences

    Definition Classes
    InlineParsers
  51. def failure(msg: String): Parser[Nothing]

    Permalink
    Definition Classes
    Parsers
  52. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  53. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  54. def guard[T](p: ⇒ Parser[T]): Parser[T]

    Permalink
    Definition Classes
    Parsers
  55. def handleWhiteSpace(source: CharSequence, offset: Int): Int

    Permalink
    Attributes
    protected
    Definition Classes
    RegexParsers
  56. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  57. val htmlAttribute: Parser[HTMLAttribute]

    Permalink

    Parses a single attribute, consisting of the name and (optional) equals sign and value.

  58. val htmlAttributeName: TextParser

    Permalink
  59. val htmlAttributeValue: Parser[(List[Span with TextContainer], Option[Char])]

    Permalink

    Parses quoted and unquoted attribute values.

  60. def htmlBlock: Parser[HTMLBlock]

    Permalink

    Parses a full HTML block, with the root element being a block-level HTML element and without parsing any standard Markdown markup.

  61. val htmlBlockElements: Set[String]

    Permalink

    Elements that the HTML specification does not define as "Phrasing Content".

    Elements that the HTML specification does not define as "Phrasing Content". These elements can serve as the root of a Block instance in the Document model. For an HTML renderer this means that it can avoid to wrap these blocks inside p tags as it would do with a normal paragraph.

  62. def htmlBlockStart: Parser[HTMLStartTag]

    Permalink

    Parses the start tag of an HTML block, only matches when the tag name is an actual block-level HTML tag.

  63. def htmlCharReference: Parser[HTMLCharacterReference]

    Permalink

    Parses a numeric or named character reference without the leading '&'.

  64. val htmlComment: Parser[HTMLComment]

    Permalink

    Parses an HTML comment without the leading '<'.

  65. def htmlDecReference: Parser[String]

    Permalink
  66. def htmlElement(nested: Map[Char, Parser[Span]]): Parser[HTMLElement]

    Permalink

    Parses an HTML element without the leading '<', but including all the nested HTML and Text elements.

  67. val htmlEmptyElement: Parser[HTMLEmptyElement]

    Permalink

    Parses an empty HTML element without the leading '<'.

    Parses an empty HTML element without the leading '<'. Only recognizes empty tags explicitly closed.

  68. def htmlEndTag(tagName: String): Parser[String]

    Permalink

    Parses an HTML end tag if it matches the specified tag name.

  69. val htmlEndTag: Parser[HTMLEndTag]

    Permalink

    Parses an HTML end tag without the leading '<'.

  70. def htmlHexReference: Parser[String]

    Permalink
  71. def htmlNamedReference: Parser[String]

    Permalink
  72. def htmlNumericReference: Parser[String]

    Permalink

    Parses a numeric character reference (decimal or hexadecimal) without the leading '&'.

  73. lazy val htmlParsers: Map[Char, Parser[Span]]

    Permalink

    The mapping of start characters to their corresponding HTML span parsers.

  74. def htmlQuotedAttributeValue(char: Char): Parser[(List[Span with TextContainer], Option[Char])]

    Permalink

    Parses an attribute value enclosed by the specified character.

  75. lazy val htmlSpan: Parser[HTMLSpan]

    Permalink

    Parses any of the HTML span elements supported by this trait, but no standard markdown inside HTML elements.

  76. lazy val htmlSpanWithNestedMarkdown: Parser[HTMLSpan]

    Permalink

    Parses any of the HTML span elements supported by this trait, plus standard markdown inside HTML elements.

  77. val htmlStartTag: Parser[HTMLStartTag]

    Permalink

    Parses an HTML start tag without the leading '<'.

    Parses an HTML start tag without the leading '<'. Only recognizes empty tags explicitly closed.

  78. val htmlTagContent: Parser[~[String, List[HTMLAttribute]]]

    Permalink

    Parses an HTML tag without the enclosing '<' and '>' characters.

  79. val htmlTagName: Parser[String]

    Permalink
  80. val htmlUnquotedAttributeValue: Parser[(List[Span with TextContainer], Option[Char])]

    Permalink
  81. val htmlWS: TextParser

    Permalink

    Parses and consumes optional whitespace, always succeeds.

  82. def image: Parser[Span]

    Permalink

    Parses an inline image.

    Parses an inline image. Recognizes both, an inline image ![text](url) and an image reference ![text][id].

    Definition Classes
    InlineParsers
  83. def indentedBlock(minIndent: Int = 1, linePredicate: ⇒ Parser[Any] = success(()), endsOnBlankLine: Boolean = false, firstLineIndented: Boolean = false, maxIndent: Int = Int.MaxValue): Parser[IndentedBlock]

    Permalink

    Parses a full block based on the specified helper parsers, expecting an indentation for all lines except the first.

    Parses a full block based on the specified helper parsers, expecting an indentation for all lines except the first. The indentation may vary between the parts of the indented block, so that this parser only cuts off the minimum indentation shared by all lines, but each line must have at least the specified minimum indentation.

    minIndent

    the minimum indentation that each line in this block must have

    linePredicate

    parser that recognizes the start of subsequent lines that still belong to the same block

    endsOnBlankLine

    indicates whether parsing should end on the first blank line

    firstLineIndented

    indicates whether the first line is expected to be indented, too

    maxIndent

    the maximum indentation that will get dropped from the start of each line of the result

    returns

    a parser that produces an instance of IndentedBlock

    Definition Classes
    BlockParsers
  84. def inline[Elem, To](text: ⇒ TextParser, nested: ⇒ Map[Char, Parser[Elem]], resultBuilder: ⇒ ResultBuilder[Elem, To]): Parser[To]

    Permalink

    Generic base parser that parses inline elements based on the specified helper parsers.

    Generic base parser that parses inline elements based on the specified helper parsers. Usually not used directly by parser implementations, this is the base parser the other inline parsers of this trait delegate to.

    Elem

    the element type produced by a single parser for a nested span

    To

    the type of the result this parser produces

    nested

    a mapping from the start character of a span to the corresponding parser for nested span elements

    resultBuilder

    responsible for building the final result of this parser based on the results of the helper parsers

    returns

    the resulting parser

    Definition Classes
    InlineParsers
  85. val insignificantSpaces: Parser[String]

    Permalink

    Parses up to 3 space characters.

    Parses up to 3 space characters. In Markdown an indentation of up to 3 spaces is optional and does not have any influence on the parsing logic.

    Definition Classes
    BlockParsers
  86. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  87. def lineBreak: Parser[LineBreak]

    Permalink

    Parses an explicit hard line break.

    Parses an explicit hard line break.

    Definition Classes
    InlineParsers
  88. def linesToString(lines: List[String]): String

    Permalink

    Merges the specified list of lines into a single string, while looking for lines ending with double spaces which stand for a hard line break in Markdown.

    Merges the specified list of lines into a single string, while looking for lines ending with double spaces which stand for a hard line break in Markdown.

    Definition Classes
    BlockParsers
  89. def link: Parser[Span]

    Permalink

    Parses a link, including nested spans in the link text.

    Parses a link, including nested spans in the link text. Recognizes both, an inline link [text](url) and a link reference [text][id].

    Definition Classes
    InlineParsers
  90. def linkTarget: Parser[ExternalLinkDefinition]

    Permalink

    Parses a link definition in the form [id]: <url> "title".

    Parses a link definition in the form [id]: <url> "title". The title is optional as well as the quotes around it and the angle brackets around the url.

    Definition Classes
    InlineParsers
  91. def list[T <: Block, I <: ListItem](itemStart: Parser[String], newList: (List[ListItem]) ⇒ T, newItem: (Int, List[Block]) ⇒ I): Parser[T]

    Permalink

    Parses a list based on the specified helper parsers.

    Parses a list based on the specified helper parsers.

    itemStart

    parser that recognizes the start of a list item, result will be discarded

    newList

    function that produces a block element for the document tree

    newItem

    function that produces a new list item element based on position and content arguments

    Definition Classes
    BlockParsers
  92. def listItem[I <: ListItem](itemStart: Parser[String]): Parser[List[Block]]

    Permalink

    Parses a single list item.

    Parses a single list item.

    itemStart

    parser that recognizes the start of a list item, result will be discarded

    Definition Classes
    BlockParsers
  93. implicit def literal(s: String): Parser[String]

    Permalink
    Definition Classes
    RegexParsers
  94. val literalBlock: Parser[LiteralBlock]

    Permalink

    Parses a literal block, text indented by a tab or 4 spaces.

    Parses a literal block, text indented by a tab or 4 spaces.

    Definition Classes
    BlockParsers
  95. def literalEnclosedByDoubleChar: Parser[Literal]

    Permalink

    Parses a literal span enclosed by double backticks.

    Parses a literal span enclosed by double backticks. Does neither parse nested spans nor Markdown escapes.

    Definition Classes
    InlineParsers
  96. def literalEnclosedBySingleChar: Parser[Literal]

    Permalink

    Parses a literal span enclosed by a single backtick.

    Parses a literal span enclosed by a single backtick. Does neither parse nested spans nor Markdown escapes.

    Definition Classes
    InlineParsers
  97. def log[T](p: ⇒ Parser[T])(name: String): Parser[T]

    Permalink
    Definition Classes
    Parsers
  98. def lookBehind[T](offset: Int, parser: ⇒ Parser[T]): Parser[T]

    Permalink

    Applies the specified parser at the specified offset behind the current position.

    Applies the specified parser at the specified offset behind the current position. Never consumes any input.

    Definition Classes
    BaseParsers
  99. val maxNestLevel: Int

    Permalink

    The maximum level of block nesting.

    The maximum level of block nesting. Some block types like lists and blockquotes contain nested blocks. To protect against malicious input or accidentally broken markup, the level of nesting is restricted.

    Definition Classes
    BlockParsers
  100. def mdBlock(firstLinePrefix: Parser[Any], linePrefix: Parser[Any], nextBlockPrefix: Parser[Any]): Parser[List[String]]

    Permalink

    Parses a single Markdown block.

    Parses a single Markdown block. In contrast to the generic block parser of the super-trait this method also consumes and ignores up to three optional space characters at the start of each line.

    firstLinePrefix

    parser that recognizes the start of the first line of this block

    linePrefix

    parser that recognizes the start of subsequent lines that still belong to the same block

    nextBlockPrefix

    parser that recognizes whether a line after one or more blank lines still belongs to the same block

    Definition Classes
    BlockParsers
  101. def mkList[T]: (~[T, List[T]]) ⇒ List[T]

    Permalink
    Definition Classes
    Parsers
  102. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  103. def nestLevel(reader: Input): Int

    Permalink

    Returns the current nest level from the specified input or 0 if it cannot be determined.

    Returns the current nest level from the specified input or 0 if it cannot be determined.

    The nest level is usually only used to prevent endless recursion of nested blocks.

    Definition Classes
    BlockParsers
  104. final lazy val nestedBlock: Parser[Block]

    Permalink

    Parses any kind of nested block supported by a concrete markup language.

    Parses any kind of nested block supported by a concrete markup language.

    Definition Classes
    BlockParsers
  105. def nestedParagraph: Parser[Block]

    Permalink

    Parses a single paragraph nested inside another block.

    Parses a single paragraph nested inside another block. Markdown allows nested lists without preceding blank lines, therefore will detect list items in the middle of a parapraph, whereas a top level paragraph won't do that. One of the questionable Markdown design decisions.

    Definition Classes
    BlockParsers
  106. def nonRecursiveBlock: Parser[Block]

    Permalink

    Parses reStructuredText blocks, except for blocks that allow nesting of blocks.

    Parses reStructuredText blocks, except for blocks that allow nesting of blocks. Only used in rare cases when the maximum nest level allowed had been reached

    Definition Classes
    BlockParsersBlockParsers
  107. def not[T](p: ⇒ Parser[T]): Parser[Unit]

    Permalink
    Definition Classes
    Parsers
  108. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  109. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  110. def opt[T](p: ⇒ Parser[T]): Parser[Option[T]]

    Permalink
    Definition Classes
    Parsers
  111. val optSpace: Parser[String]

    Permalink

    Parses 0 or 1 space character, always succeeds.

    Parses 0 or 1 space character, always succeeds.

    Definition Classes
    BlockParsers
  112. def optimizedCharLookup(chars: Char*): (Char) ⇒ Boolean

    Permalink

    Returns an optimized, Array-based lookup function for the specified characters.

    Returns an optimized, Array-based lookup function for the specified characters.

    Attributes
    protected
    Definition Classes
    MarkupParsers
  113. def optimizedRangeLookup(ranges: Traversable[Char]*): (Char) ⇒ Boolean

    Permalink

    Returns an optimized, Array-based lookup function for the specified ranges of characters.

    Returns an optimized, Array-based lookup function for the specified ranges of characters.

    Attributes
    protected
    Definition Classes
    MarkupParsers
  114. def paragraph: Parser[Paragraph]

    Permalink

    Parses a single paragraph.

    Parses a single paragraph. Everything between two blank lines that is not recognized as a special Markdown block type will be parsed as a regular paragraph.

    Definition Classes
    BlockParsers
  115. def parse[T](p: Parser[T], in: Reader): ParseResult[T]

    Permalink
    Definition Classes
    RegexParsers
  116. def parse[T](p: Parser[T], in: CharSequence): ParseResult[T]

    Permalink
    Definition Classes
    RegexParsers
  117. def parse[T](p: Parser[T], in: Reader[Char]): ParseResult[T]

    Permalink
    Definition Classes
    RegexParsers
  118. def parseAll[T](p: Parser[T], in: CharSequence): ParseResult[T]

    Permalink
    Definition Classes
    RegexParsers
  119. def parseAll[T](p: Parser[T], in: Reader): ParseResult[T]

    Permalink
    Definition Classes
    RegexParsers
  120. def parseAll[T](p: Parser[T], in: Reader[Char]): ParseResult[T]

    Permalink
    Definition Classes
    RegexParsers
  121. def parseConfigAndRoot(reader: Reader[Char], path: Path): (Config, RootElement)

    Permalink

    Fully parses the input from the specified reader and returns the configuration and root element.

    Fully parses the input from the specified reader and returns the configuration and root element.

    Attributes
    protected
    Definition Classes
    BlockParsers
  122. def parseDocument(reader: Reader[Char], path: Path): Document

    Permalink

    Fully parses the input from the specified reader and returns the document tree.

    Fully parses the input from the specified reader and returns the document tree. This function is expected to always succeed, errors would be considered a bug of this library, as the parsers treat all unknown or malformed markup as regular text.

    Definition Classes
    BlockParsers
  123. def parseInline(source: String): List[Span]

    Permalink

    Fully parses the input string and produces a list of spans, using the default span parsers returned by the spanParsers method.

    Fully parses the input string and produces a list of spans, using the default span parsers returned by the spanParsers method.

    This function is expected to always succeed, errors would be considered a bug of this library, as the parsers treat all unknown or malformed markup as regular text. Some parsers might additionally insert system message elements in case of markup errors.

    source

    the input to parse

    returns

    the result of the parser in form of a list of spans

    Definition Classes
    InlineParsers
  124. def parseInline(source: String, spanParsers: Map[Char, Parser[Span]]): List[Span]

    Permalink

    Fully parses the input string and produces a list of spans.

    Fully parses the input string and produces a list of spans.

    This function is expected to always succeed, errors would be considered a bug of this library, as the parsers treat all unknown or malformed markup as regular text. Some parsers might additionally insert system message elements in case of markup errors.

    source

    the input to parse

    spanParsers

    a mapping from the start character of a span to the corresponding parser

    returns

    the result of the parser in form of a list of spans

    Definition Classes
    InlineParsers
  125. def parseMarkup[T](parser: Parser[T], reader: Reader[Char]): T

    Permalink

    Fully parses the input from the specified reader and returns the result.

    Fully parses the input from the specified reader and returns the result. This function is expected to always succeed, errors would be considered a bug in this library, as the parsers treat all unknown or malformed markup as regular text.

    Definition Classes
    MarkupParsers
  126. def parseMarkup[T](parser: Parser[T], source: String): T

    Permalink

    Fully parses the specified input string and returns the result.

    Fully parses the specified input string and returns the result. This function is expected to always succeed, errors would be considered a bug in this library, as the parsers treat all unknown or malformed markup as regular text.

    Definition Classes
    MarkupParsers
  127. def parseNestedBlocks(block: IndentedBlock): List[Block]

    Permalink

    Parses all nested blocks inside the specified indented block.

    Parses all nested blocks inside the specified indented block.

    Definition Classes
    BlockParsers
  128. def parseNestedBlocks(input: String, nestLevel: Int): List[Block]

    Permalink

    Parses all nested blocks for the specified input and nest level.

    Parses all nested blocks for the specified input and nest level. Delegates to the abstract nestedBlock parser that sub-traits need to define. The nest level is primarily used as a protection against malicious input that forces endless recursion.

    input

    the input to parse

    nestLevel

    the level of nesting with 0 being the outermost level

    returns

    the parser result as a list of blocks

    Definition Classes
    BlockParsers
  129. def parseNestedBlocks(lines: List[String], nestLevel: Int): List[Block]

    Permalink

    Parses all nested blocks for the specified input and nest level.

    Parses all nested blocks for the specified input and nest level. Delegates to the abstract nestedBlock parser that sub-traits need to define. The nest level is primarily used as a protection against malicious input that forces endless recursion.

    lines

    the input to parse

    nestLevel

    the level of nesting with 0 being the outermost level

    returns

    the parser result as a list of blocks

    Definition Classes
    BlockParsers
  130. def parseParagraph(lines: List[String]): Paragraph

    Permalink
    Definition Classes
    BlockParsers
  131. def phrase[T](p: Parser[T]): Parser[T]

    Permalink
    Definition Classes
    RegexParsers → Parsers
  132. def positioned[T <: Positional](p: ⇒ Parser[T]): Parser[T]

    Permalink
    Definition Classes
    RegexParsers → Parsers
  133. def prepareBlockParsers(nested: Boolean): List[Parser[Block]]

    Permalink

    Extension hook for assembling the block parsers for a particular markup format.

    Extension hook for assembling the block parsers for a particular markup format.

    nested

    true if these are parsers for nested blocks, false if they are for top level blocks

    returns

    a list of block parsers which later will be interpreted as choices in the specified order

    Attributes
    protected
    Definition Classes
    HTMLParsersBlockParsersBlockParsers
  134. def prepareSpanParsers: Map[Char, Parser[Span]]

    Permalink

    Creates a new mapping from the start character of an inline span to the corresponding parser.

    Creates a new mapping from the start character of an inline span to the corresponding parser. May be overridden by subtraits.

    Attributes
    protected
    Definition Classes
    HTMLParsersInlineParsersInlineParsers
  135. def quotedBlock: Parser[QuotedBlock]

    Permalink

    Parses a quoted block, a paragraph starting with a '>' character, with subsequent lines optionally starting with a '>', too.

    Parses a quoted block, a paragraph starting with a '>' character, with subsequent lines optionally starting with a '>', too.

    Definition Classes
    BlockParsers
  136. val refName: Parser[String]

    Permalink

    Parses a simple reference name that only allows alphanumerical characters and the punctuation characters -, _, ., :, +.

    Parses a simple reference name that only allows alphanumerical characters and the punctuation characters -, _, ., :, +.

    Definition Classes
    MarkupParsers
  137. implicit def regex(r: Regex): Parser[String]

    Permalink
    Definition Classes
    RegexParsers
  138. def rep[T](first: ⇒ Parser[T], next: (T) ⇒ Parser[T]): Parser[List[T]]

    Permalink

    A parser generator for repetitions where all subsequent parsers after the first depend on the result of the previous.

    A parser generator for repetitions where all subsequent parsers after the first depend on the result of the previous.

    first

    the parser to use for the first piece of input

    next

    a function that determines the next parser based on the result of the previous

    Definition Classes
    BaseParsers
  139. def rep[T](p: ⇒ Parser[T]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
  140. def rep1[T](first: ⇒ Parser[T], p0: ⇒ Parser[T]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
    Annotations
    @migration
    Migration

    (Changed in version 2.9.0) The p0 call-by-name arguments is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.

  141. def rep1[T](p: ⇒ Parser[T]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
  142. def rep1sep[T](p: ⇒ Parser[T], q: ⇒ Parser[Any]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
  143. def repMax[T](num: Int, p: ⇒ Parser[T]): Parser[List[T]]

    Permalink

    Uses the parser for at most the specified number of repetitions, always succeeds.

    Uses the parser for at most the specified number of repetitions, always succeeds. The result is the list of results from applying the parser repeatedly.

    Definition Classes
    BaseParsers
  144. def repMin[T](num: Int, p: ⇒ Parser[T]): Parser[List[T]]

    Permalink

    Uses the parser for at least the specified number of repetitions or otherwise fails.

    Uses the parser for at least the specified number of repetitions or otherwise fails. Continues to apply the parser after the minimum has been reached until if fails. The result is the list of results from applying the parser repeatedly.

    Definition Classes
    BaseParsers
  145. def repN[T](num: Int, p: ⇒ Parser[T]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
  146. def repsep[T](p: ⇒ Parser[T], q: ⇒ Parser[Any]): Parser[List[T]]

    Permalink
    Definition Classes
    Parsers
  147. def resource(inline: (String, String, Option[String]) ⇒ Span, ref: (String, String, String) ⇒ Span): Parser[Span]

    Permalink

    Helper function that abstracts the common parser logic of links and images.

    Helper function that abstracts the common parser logic of links and images.

    inline

    factory function for creating a new inline link or image based on the text, url and optional title parameters

    ref

    factory function for creating a new link or image reference based on the text and id parameters

    Definition Classes
    InlineParsers
  148. def restOfLine: Parser[String]

    Permalink

    Parses the rest of the line from the current input offset no matter whether it consist of whitespace only or some text.

    Parses the rest of the line from the current input offset no matter whether it consist of whitespace only or some text. Does not include the eol character(s).

    Definition Classes
    BlockParsers
  149. def rootElement: Parser[RootElement]

    Permalink

    Parses a full document, delegating most of the work to the topLevelBlock parser.

    Parses a full document, delegating most of the work to the topLevelBlock parser.

    Definition Classes
    BlockParsers
  150. lazy val rule: Parser[Block]

    Permalink

    Parses a horizontal rule, a line only decorated with three or more '*', '-' or '_' characters with optional spaces between them

    Parses a horizontal rule, a line only decorated with three or more '*', '-' or '_' characters with optional spaces between them

    Definition Classes
    BlockParsers
  151. lazy val setextHeader: Parser[Header]

    Permalink

    Parses a 1st or 2nd level Setext header.

    Parses a 1st or 2nd level Setext header. A first level header consists of the text of the header followed by a line of one or more '=' characters, a 2nd level header uses '-' characters instead.

    In contrast to several other Markdown parsers this parser requires a blank line before the header.

    Definition Classes
    BlockParsers
  152. def simpleLink: Parser[ExternalLink]

    Permalink

    Parses a simple inline link in the form of <http://someURL/>

    Parses a simple inline link in the form of <http://someURL/>

    Definition Classes
    InlineParsers
  153. def skipWhitespace: Boolean

    Permalink
    Definition Classes
    MarkupParsers → RegexParsers
  154. def span(start: Parser[Any], end: Parser[Any]): Parser[List[Span]]

    Permalink

    Creates a parser for an inline span based on the specified parsers that represent the start and end condition.

    Creates a parser for an inline span based on the specified parsers that represent the start and end condition.

    start

    the parser that parses the beginning of the span, result will be discarded

    end

    the parser that recognizes the end of the span, result will be discarded

    Definition Classes
    InlineParsers
  155. final lazy val spanParsers: Map[Char, Parser[Span]]

    Permalink

    The mapping of markup start characters to their corresponding span parsers.

    The mapping of markup start characters to their corresponding span parsers.

    A parser mapped to a start character is not required to successfully parse the subsequent input. If it fails the character that triggered the parser invocation will be treated as normal text. The mapping is merely used as a performance optimization. The parser will be invoked with the input offset pointing to the character after the one specified as the key for the mapping.

    Definition Classes
    InlineParsers
  156. def spans(parser: ⇒ TextParser, spanParsers: ⇒ Map[Char, Parser[Span]]): Parser[List[Span]]

    Permalink

    Parses a list of spans based on the specified helper parsers.

    Parses a list of spans based on the specified helper parsers.

    parser

    the parser for the text of the current span element

    returns

    the resulting parser

    Definition Classes
    InlineParsers
  157. def standardMarkdownBlock: Parser[Block]

    Permalink

    Parses all of the standard Markdown blocks, except normal paragraphs and those blocks that deal with verbatim HTML.

    Parses all of the standard Markdown blocks, except normal paragraphs and those blocks that deal with verbatim HTML. For the latter parsers are provided by a separate, optional trait.

    Definition Classes
    BlockParsers
  158. def strong(char: Char): Parser[Strong]

    Permalink

    Parses a span of strong text enclosed by two consecutive occurrences of the specified character.

    Parses a span of strong text enclosed by two consecutive occurrences of the specified character.

    Definition Classes
    InlineParsers
  159. def success[T](v: T): Parser[T]

    Permalink
    Definition Classes
    Parsers
  160. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  161. val tabOrSpace: Parser[Any]

    Permalink

    Parses a single tab or space character.

    Parses a single tab or space character.

    Definition Classes
    BlockParsers
  162. def text(parser: ⇒ TextParser, nested: ⇒ Map[Char, Parser[String]]): Parser[String]

    Permalink

    Parses text based on the specified helper parsers.

    Parses text based on the specified helper parsers.

    parser

    the parser for the text of the current element

    nested

    a mapping from the start character of a span to the corresponding parser for nested span elements

    returns

    the resulting parser

    Definition Classes
    InlineParsers
  163. val textLine: Parser[String]

    Permalink

    Parses a single text line from the current input offset (which may not be at the start of the line.

    Parses a single text line from the current input offset (which may not be at the start of the line. Fails for blank lines. Does not include the eol character(s).

    Definition Classes
    BlockParsers
  164. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  165. final lazy val topLevelBlock: Parser[Block]

    Permalink

    Parses any kind of top-level block supported by a concrete markup language.

    Parses any kind of top-level block supported by a concrete markup language.

    Definition Classes
    BlockParsers
  166. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  167. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  168. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  169. val whiteSpace: Regex

    Permalink
    Attributes
    protected
    Definition Classes
    RegexParsers
  170. def withNestLevel[T](p: ⇒ Parser[T]): Parser[(Int, T)]

    Permalink

    Creates a new parser that produces a tuple containing the current nest level as well as the result from the specified parser.

    Creates a new parser that produces a tuple containing the current nest level as well as the result from the specified parser.

    The nest level is usually only used to prevent endless recursion of nested blocks.

    Definition Classes
    BlockParsers
  171. def ws: TextParser

    Permalink

    Parses horizontal whitespace (space and tab).

    Parses horizontal whitespace (space and tab). Always succeeds, consuming all whitespace found.

    Definition Classes
    MarkupParsers

Inherited from BlockParsers

Inherited from parse.BlockParsers

Inherited from InlineParsers

Inherited from parse.InlineParsers

Inherited from MarkupParsers

Inherited from BaseParsers

Inherited from RegexParsers

Inherited from Parsers

Inherited from AnyRef

Inherited from Any

Ungrouped