jot

Types

pub type Container {
  Paragraph(List(Inline))
  Heading(level: Int, attributes: Attrs, content: List(Inline))
  Codeblock(language: Option(String), content: String)
}

Constructors

  • Paragraph(List(Inline))
  • Heading(level: Int, attributes: Attrs, content: List(Inline))
  • Codeblock(language: Option(String), content: String)
pub type Destination {
  Reference(String)
  Url(String)
}

Constructors

  • Reference(String)
  • Url(String)
pub type Document {
  Document(
    content: List(Container),
    references: Dict(String, String),
  )
}

Constructors

  • Document(
      content: List(Container),
      references: Dict(String, String),
    )
pub type Inline {
  Text(String)
  Link(content: List(Inline), destination: Destination)
}

Constructors

  • Text(String)
  • Link(content: List(Inline), destination: Destination)

Functions

pub fn document_to_html(document: Document) -> String
pub fn parse(djot: String) -> Document
pub fn to_html(djot: String) -> String
Search Document