jot

Types

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

Constructors

  • Paragraph(attributes: Dict(String, String), List(Inline))
  • Heading(
      attributes: Dict(String, String),
      level: Int,
      content: List(Inline),
    )
  • Codeblock(
      attributes: Dict(String, String),
      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