Kotoba.Nodes.Paragraph (Kotoba v0.5.0)

Copy Markdown View Source

A paragraph (Lexical type "paragraph").

text_format and text_style are the format and the style that Lexical gives to new text in the paragraph.

Blank lines

An empty paragraph between other blocks (of the root, of a quote of blocks or of a footnote) is a blank line, as a person typed it. It keeps its height in HTML (<p><br></p>), and it is &nbsp; in Markdown, which Kotoba.Content.from_markdown/2 reads back as an empty paragraph. An empty paragraph at the start or the end is not a blank line.

The blank_lines: :collapse render option leaves blank lines out of the HTML, the text and the Markdown.

Summary

Functions

Returns true when the paragraph has no content: no children, or only text nodes with no text.

Types

t()

@type t() :: %Kotoba.Nodes.Paragraph{
  children: term(),
  direction: term(),
  extra: term(),
  format: term(),
  indent: term(),
  text_format: term(),
  text_style: term(),
  version: term()
}

Functions

empty?(arg1)

@spec empty?(t()) :: boolean()

Returns true when the paragraph has no content: no children, or only text nodes with no text.