Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "parse"

Index

Type aliases

ParseResult

ParseResult: ResultBody<any[]>

Variables

Const BQUOTE

BQUOTE: ">" = ">"

Const CODE

CODE: "`" = "`"

Const CODEBLOCK

CODEBLOCK: "```" = "```"

Const CODEBLOCK_END

CODEBLOCK_END: "```" = "```"

Const EM

EM: "_" = "_"

Const HD

HD: "#" = "#"

Const HR

HR: "-" = "-"

Const IMG

IMG: "![" = "!["

Const LI

LI: "- " = "- "

Const LINK_HREF

LINK_HREF: "(" = "("

Const LINK_HREF_END

LINK_HREF_END: ")" = ")"

Const LINK_LABEL

LINK_LABEL: "[" = "["

Const LINK_LABEL_END

LINK_LABEL_END: "]" = "]"

Const NL

NL: "" = ""

Const STRIKE

STRIKE: "~~" = "~~"

Const STRONG

STRONG: "**" = "**"

Const TD

TD: "|" = "|"

Functions

Const collect

  • collect(id: State): (Anonymous function)

Const collectAndRestart

  • collectAndRestart(tag: (xs: any[]) => any[]): (Anonymous function)

Const collectBlockQuote

Const collectChildren

  • collectChildren(ctx: FSMCtx): any[]

Const collectCodeBlock

  • collectCodeBlock(tag: Fn2<string, string, any[]>): (Anonymous function)

Const collectHeading

  • collectHeading(tag: Fn2<number, any[], any[]>): (Anonymous function)

Const collectInline

  • collectInline(fn: Fn<string, any[]>): (Anonymous function)

Const collectLi

  • collectLi(ctx: FSMCtx, tag: Fn<any[], any[]>): number

Const collectList

  • collectList(type: string, list: Fn2<string, any[], any[]>, item: Fn<any[], any[]>): (Anonymous function)

Const collectTD

  • collectTD(tag: Fn2<number, any[], any[]>): (Anonymous function)

Const collectTR

  • collectTR(tag: Fn2<number, any[], any[]>): (Anonymous function)

Const collectTable

  • collectTable(tag: Fn<any[], any[]>): (Anonymous function)

Const heading

Const matchInline

  • matchInline(id: State): (() => MatcherInst<T, C, R>)[]

Const matchLink

  • matchLink(result: Fn2<string, string, any[]>): () => MatcherInst<T, C, R>
  • Parameters

    • result: Fn2<string, string, any[]>

    Returns () => MatcherInst<T, C, R>

      • (): MatcherInst<T, C, R>
      • Returns MatcherInst<T, C, R>

Const matchPara

  • matchPara(id: State, next: State): () => MatcherInst<T, C, R>

Const newList

Const newPara

Const newParaCode

Const newParaInline

  • newParaInline(next: State): (Anonymous function)

Const newTable

  • newTable(ctx: FSMCtx): [string | number, undefined | any[][]]

Const parse

  • parse(_tags?: Partial<TagFactories>): (rfn: Reducer<any, B>) => Reducer<any, A>
  • Main parser / transducer. Defines state map with the various Markdown syntax matchers and state transition handlers. The returned parser itself is only used in index.ts.

    Parameters

    Returns (rfn: Reducer<any, B>) => Reducer<any, A>

      • (rfn: Reducer<any, B>): Reducer<any, A>
      • Parameters

        • rfn: Reducer<any, B>

        Returns Reducer<any, A>

Const pop

  • pop(result: Fn2<FSMCtx, string, any>): (Anonymous function)

Const push

  • push(id: State, next: State): (Anonymous function)

Const transition

Object literals

Const DEFAULT_TAGS

DEFAULT_TAGS: object

Default hiccup element factories

blockquote

  • blockquote(xs: any[]): any[]

code

  • code(body: string): string[]

codeblock

  • codeblock(lang: string, body: string): (string | { lang: string })[]

em

  • em(body: string): string[]

heading

  • heading(level: number, xs: any[]): any[]

hr

  • hr(): string[]

img

  • img(src: string, alt: string): (string | { alt: string; src: string })[]

li

  • li(xs: any[]): any[]

link

  • link(href: string, body: string): (string | { href: string })[]

list

  • list(type: string, xs: any[]): any[]

paragraph

  • paragraph(xs: any[]): any[]

strike

  • strike(body: string): string[]

strong

  • strong(body: string): string[]

table

  • table(rows: any[]): (string | any[])[]

td

  • td(_: number, xs: any[]): any[]

tr

  • tr(_: number, xs: any[]): any[]

Generated using TypeDoc