Documentation

Lean.Data.Markdown.Lines

Source Lines #

A nonempty array of source lines, and the subslice operations that the parser uses to delimit them.

The subslice from a to b, or the empty subslice at a if b is before a.

Equations
Instances For

    Parses a line ending, which is \r\n, \r, or \n (CommonMark §2.1), at p in input. Returns the position after the ending.

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

      text without the trailing characters that satisfy p.

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

        The text of a construct that may span source lines, as one subslice per line.

        The lines are in source order and are nonempty. The subslices exclude line endings and the prefixes of enclosing containers.

        • toArray : Array s.Subslice

          The subslices, one per source line, in source order.

        • nonempty : 0 < self.toArray.size

          There is at least one line.

        Instances For

          A single line.

          Equations
          Instances For
            def Lean.Markdown.Lines.push {s : String.Slice} (lines : Lines s) (line : s.Subslice) :

            Appends a line.

            Equations
            Instances For

              The first line.

              Equations
              Instances For

                The last line.

                Equations
                Instances For

                  The text of each line, as a string.

                  Equations
                  Instances For
                    def Lean.Markdown.Lines.text {s : String.Slice} (lines : Lines s) (sep : String := "\n") :

                    The text of the lines, joined by sep.

                    Equations
                    Instances For
                      def Lean.Markdown.span {s : String.Slice} (first last : s.Subslice) :

                      The subslice from the start of first to the end of last.

                      Equations
                      Instances For

                        The subslice from the start of the first line to the end of the last.

                        Equations
                        Instances For