Earmark v1.3.2 Earmark.Block View Source

Given a list of parsed lines, convert them into blocks. That list of blocks is the final representation of the document (in internal form).

Link to this section Summary

Link to this section Types

Link to this type

inline_code_continuation() View Source
inline_code_continuation() :: {nil | String.t(), number()}

Link to this type

maybe(t) View Source
maybe(t) :: t | nil

Link to this type

message_type() View Source
message_type() :: :warning | :error

Link to this type

numbered_line() View Source
numbered_line() :: %{
  :line => String.t(),
  :lnb => number(),
  optional(:inside_code) => String.t()
}

Link to this type

t() View Source
t() ::
  %Earmark.Block.Heading{
    attrs: term(),
    content: term(),
    level: term(),
    lnb: term()
  }
  | %Earmark.Block.Ruler{attrs: term(), lnb: term(), type: term()}
  | %Earmark.Block.BlockQuote{attrs: term(), blocks: term(), lnb: term()}
  | %Earmark.Block.List{
      attrs: term(),
      blocks: term(),
      lnb: term(),
      start: term(),
      type: term()
    }
  | %Earmark.Block.ListItem{
      attrs: term(),
      blocks: term(),
      bullet: term(),
      lnb: term(),
      spaced: term(),
      type: term()
    }
  | %Earmark.Block.Para{attrs: term(), lines: term(), lnb: term()}
  | %Earmark.Block.Code{
      attrs: term(),
      language: term(),
      lines: term(),
      lnb: term()
    }
  | %Earmark.Block.Html{attrs: term(), html: term(), lnb: term(), tag: term()}
  | %Earmark.Block.HtmlOther{attrs: term(), html: term(), lnb: term()}
  | %Earmark.Block.IdDef{
      attrs: term(),
      id: term(),
      lnb: term(),
      title: term(),
      url: term()
    }
  | %Earmark.Block.FnDef{
      attrs: term(),
      blocks: term(),
      id: term(),
      lnb: term(),
      number: term()
    }
  | %Earmark.Block.FnList{attrs: term(), blocks: term(), lnb: term()}
  | %Earmark.Block.Ial{
      attrs: term(),
      content: term(),
      lnb: term(),
      verbatim: term()
    }
  | %Earmark.Block.Table{
      alignments: term(),
      attrs: term(),
      header: term(),
      lnb: term(),
      rows: term()
    }

Link to this type

tokens() View Source
tokens() :: [token()]

Link to this section Functions

Link to this function

assign_attributes_to_blocks(list, result) View Source