View Source Lexical.Document.Line (lexical_shared v0.5.0)

A record representing a line of text in a document

A line contains the following keys:

text: The actual text of the line, without the line ending

ending: The end of line character(s) can be "\n", "\r" or "\r\n". The original line ending is preserved

line_number: A zero-based line number

ascii?: A boolean representing if this line consists of only ascii text.

Link to this section Summary

Functions

Creates or matches a line of text

Link to this section Types

@type t() ::
  {:line, text :: String.t(), ending :: String.t(),
   line_number :: non_neg_integer(), ascii? :: boolean()}

Link to this section Functions

Link to this macro

line(args \\ [])

View Source (macro)

Creates or matches a line of text

Link to this macro

line(record, args)

View Source (macro)