Parse Markdown to HTML using cmark-gfm, GitHub's implementation of Markdown with extensions for tables, strikethrough, etc. For details on the meaning of the various options, refer to GitHub's Markdown documentation.

let inputString = "# Header\n\nMy **markdown** text";
let md = new GitHubMarkdown();

let outputString = md.render(inputString);

Deprecated

noImages: boolean

No longer valid with CMark implementation.

noLinks: boolean

No longer valid with CMark implementation.

removeHTMLTags: boolean

No longer valid with CMark implementation.

safeLinks: boolean

No longer valid with CMark implementation.

smartQuotesEnabled: boolean

No longer valid with CMark implementation

strict: boolean

No longer valid with CMark implementation.

Extensions

autoLinks: boolean

Enables expansion of certain partial URLs. Defaults: true

strikethrough: boolean

Support ~~strikethrough~~ markup. Defaults: true

tables: boolean

Parse Markdown tables. Defaults: true

tagFilters: boolean

Disallows certain HTML tags. Defaults: false

taskLists: boolean

Support [ ] task lists. Default: true

Options

footnotes: boolean

Support Markdown Footnotes. Default: true

hardBreaks: boolean

Render softbreak elements as hard line breaks. Default: false

safe: boolean

Suppress raw HTML and unsafe links. Default: true

smartQuotes: boolean

Convert straight quotes to curly, --- to em dashes, -- to en dashes. Default: true

sourcePOS: boolean

Include a data-sourcepos attribute on all block elements. Default: false

unsafe: boolean

Render "dangerous" HTML and unsafe links. Default: false

validateUTF8: boolean

Validate UTF-8 before parsing, replacing illegal sequences. Default: false

Other

  • Takes Markdown string passed and processes it with GitHub Markdown parser based on the property selections on the object.

    Parameters

    • markdownStr: string

    Returns string

""