View on GitHub

Html2commonmark

Converts HTML to markdown. Compliant with the commmonmark markdown specification.

Download this project as a .zip file Download this project as a tar.gz file

Intro

CommonMark is a rationalized specification of the Markdown syntax. For more information about markdown and commonmark, see http://commonmark.org.

With html2commonmark, you can convert html back to markdown. It uses the exact same Abstract Syntax Tree as commonmark.js and is as complaint as can be with the commonmark spec.

View on GitHub

A live demo

Html

Markdown

Abstract syntax tree

Presentation