kirala/markdown/parser

Types

pub type Align {
  AlignLeft
  AlignRight
  AlignCenter
}

Constructors

  • AlignLeft
  • AlignRight
  • AlignCenter
pub type ListType {
  StdList
  OrderedList
  CheckedList
  UncheckedList
}

Constructors

  • StdList
  • OrderedList
  • CheckedList
  • UncheckedList
pub type Token {
  Line(List(Token))
  LineIndent(Int, List(Token))
  Text(String)
  Bold(Token)
  Italic(Token)
  StrikeThrough(Token)
  MarkedText(Token)
  InsertedText(Token)
  Note(String, Token)
  H(Int, Int, Token)
  CodeBlock(String, String, String)
  CodeSpan(String)
  CodeLine(String)
  BlockQuote(Int, Token)
  ListItem(ListType, Int, Token)
  Url(UrlData)
  UrlLink(String, UrlData)
  ImgLink(String, String, UrlData)
  FootNote(String, Token)
  FootNoteUrlDef(String, String, String)
  Table(List(Token), List(Align), List(List(Token)))
  DefinitionOf(Token)
  Definition(List(Token))
  DefinitionIs(String, Token)
  HR
}

Constructors

  • Line(List(Token))
  • LineIndent(Int, List(Token))
  • Text(String)
  • Bold(Token)
  • Italic(Token)
  • StrikeThrough(Token)
  • MarkedText(Token)
  • InsertedText(Token)
  • Note(String, Token)
  • H(Int, Int, Token)
  • CodeBlock(String, String, String)
  • CodeSpan(String)
  • CodeLine(String)
  • BlockQuote(Int, Token)
  • ListItem(ListType, Int, Token)
  • Url(UrlData)
  • UrlLink(String, UrlData)
  • ImgLink(String, String, UrlData)
  • FootNote(String, Token)
  • FootNoteUrlDef(String, String, String)
  • Table(List(Token), List(Align), List(List(Token)))
  • DefinitionOf(Token)
  • Definition(List(Token))
  • DefinitionIs(String, Token)
  • HR
pub type TokenRes {
  TokenRes(Token, String)
}

Constructors

  • TokenRes(Token, String)
pub type UrlData {
  UrlPlain(String)
  UrlFootNote(String)
}

Constructors

  • UrlPlain(String)
  • UrlFootNote(String)

Functions

pub fn parse(lineno: Int, src: String) -> TokenRes
pub fn parse_all(src: String) -> List(Token)
pub fn pop_grapheme(src: String) -> #(String, String)
pub fn ret_string(bitstr: String) -> String
pub fn ret_string_trim(bitstr: String) -> String
Search Document