Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fresh/www/utils/markdown.ts>gfm.Marked.marked

The next-gen web framework.
Extremely Popular
Go to Latest
namespace gfm.Marked.marked
import { gfm } from "https://deno.land/x/fresh@1.5.1/www/utils/markdown.ts";
const { marked } = gfm.Marked;
function gfm.Marked.marked
import { gfm } from "https://deno.land/x/fresh@1.5.1/www/utils/markdown.ts";
const { marked } = gfm.Marked;

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 asynchronously with a callback.

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

Compiles markdown to HTML asynchronously with a callback.

Parameters

src: string

String of markdown source to be compiled

options: marked.MarkedOptions

Hash of options

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

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