Documentation

Lean.Data.Markdown.Parser.RefDef

Link Reference Definitions #

Parsers for link reference definitions (CommonMark §4.7), which the block parser extracts from the front of paragraphs at a setext heading underline and after the block structure is complete.

Parses the content of a link label (CommonMark §6.3) at cur, which is positioned just after the [. A label may span lines, but blank lines and unescaped brackets are not permitted inside it, and it must contain at least one non-whitespace character and at most 999 characters. Returns the label's lines and the final cursor, which is positioned at the closing ].

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    Tries to parse a CommonMark link reference definition that starts at start in source. Recognizes both bracketed <url> and unbracketed link destinations, and optional "…"/'…'/(…) titles (which may appear on the line that follows the URL). The label may span multiple lines, but blank lines are not permitted inside it.

    Returns the definition plus the position one past the last consumed character.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Greedily consumes link ref definitions from the front of source.

      Returns the extracted linkRefDef blocks together with the residual InlineSource. The residual is none when the definitions consumed every line.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For