Skip to content

benweet/to-markdown

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

to-markdown

An HTML to Markdown converter written in javascript.

A basic implementation is there, but it's not yet fully bulletproof (contributions welcome!).

Known issues

There are a couple of known issues surrounding blockquotes in lists (and perhaps vice versa) — #2; and also how to handle HTML elements outside of the markdown subset (keep them/strip them?) — #3.

Running under Node.js

to-markdown can also be run under Node.js. Install it via NPM, and then:

var toMarkdown = require('to-markdown').toMarkdown;
console.log(toMarkdown('<b>Hello world</b>'));
// Will output '**Hello world**'

Unit tests

Node.js unit tests can be run with NodeUnit:

$ npm test

This will test both server-side and client-side tests (using zombie-qunit).

Licence

to-markdown is copyright © 2011 Dom Christie and released under the MIT license.

About

An HTML to Markdown converter written in javascript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%