Skip to content

taqueci/turndown

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

to-markdown

An HTML to Markdown converter written in javascript.

Running in the browser (requires jQuery)

Include the script, and then:

var converter = toMarkdown.converter();
converter.makeMd('<h1>Hello world!</h1>'); // '# Hello world'

Running under Node.js

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

var toMarkdown = require('to-markdown'),
    converter = new toMarkdown.converter();
converter.makeMd('<h1>Hello world</h1>', function(result) {
  // result == '# Hello world'
  // do something with result
});

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-2012 Dom Christie and released under the MIT license.

About

🛏 An HTML to Markdown converter written in JavaScript

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 51.3%
  • JavaScript 48.7%