2.0.1 • Published 5 years ago
unmark v2.0.1
Unmark
A simple HTML to Markdown converter. Takes HTML and produces Markdown.
Use cases
For some applications you may receive HTML, but you simply want the text in a more readable and flattened format. Unmark will convert HTML into Markdown. If you want the text back into HTML, but with less complexity and cleaned from HTML attributes like class tags, then you could use any Markdown compiler like Marked to produce it.
Installation
Install via console: npm install unmark
Usage
const unmark = require('unmark');
const html = '<div><section><p>hello <strong>markdown</strong>.</p></section></div>';
const markdownOutput = unmark(html);
console.log(markdownOutput);
Todo
- Full Github Markdown spec compliance
- Add tests