Skip to main content
Module

x/lunchbox/src/markdown.ts>Marked.Marked#parse

Component Library 🍱 for Deno πŸ¦• Fresh πŸ‹
Go to Latest
method Marked.Marked.prototype.parse
import { Marked } from "https://deno.land/x/lunchbox@v0.3.15/src/markdown.ts";
const { Marked } = Marked;

Compiles markdown to HTML.

Parameters

src: string

String of markdown source to be compiled

callback: (error: any, parseResult: string) => void

Function called when the markdownString has been fully parsed when using async highlighting

Returns

void

String of compiled HTML

Compiles markdown to HTML asynchronously.

Parameters

src: string

String of markdown source to be compiled

options: marked.MarkedOptions & { async: true; }

Hash of options having async: true

Returns

Promise<string>

Promise of string of compiled HTML

Compiles markdown to HTML synchronously.

Parameters

src: string

String of markdown source to be compiled

optional
options: marked.MarkedOptions

Optional hash of options

Returns

string

String of compiled HTML

Compiles markdown to HTML synchronously.

Parameters

src: string

String of markdown source to be compiled

options: marked.MarkedOptions

Optional hash of options

callback: (error: any, parseResult: string) => void

Function called when the markdownString has been fully parsed when using async highlighting

Returns

void

String of compiled HTML