{ "name": "markdown", "version": "0.5.0", "description": "A sensible Markdown parser for javascript", "keywords": [ "markdown", "text processing", "ast" ], "maintainers": [ { "name": "Dominic Baggott", "email": "dominic.baggott@gmail.com", "url": "http://evilstreak.co.uk" }, { "name": "Ash Berlin", "email": "ash_markdownjs@firemirror.com", "url": "http://ashberlin.com" } ], "contributors": [ { "name": "Dominic Baggott", "email": "dominic.baggott@gmail.com", "url": "http://evilstreak.co.uk" }, { "name": "Ash Berlin", "email": "ash_markdownjs@firemirror.com", "url": "http://ashberlin.com" } ], "bugs": { "url": "http://github.com/evilstreak/markdown-js/issues" }, "licenses": [ { "type": "MIT", "url": "http://www.opensource.org/licenses/mit-license.php" } ], "repository": { "type": "git", "url": "git://github.com/evilstreak/markdown-js.git" }, "main": "./lib/index.js", "bin": { "md2html": "./bin/md2html.js" }, "dependencies": { "nopt": "~2.1.1" }, "devDependencies": { "tap": "~0.3.3" }, "scripts": { "test": "tap ./test/*.t.js" }, "readme": "# markdown-js\n\nYet another markdown parser, this time for JavaScript. There's a few\noptions that precede this project but they all treat markdown to HTML\nconversion as a single step process. You pass markdown in and get HTML\nout, end of story. We had some pretty particular views on how the\nprocess should actually look, which include:\n\n * producing well-formed HTML. This means that `em` and `strong` nesting\n is important, as is the ability to output as both HTML and XHTML\n\n * having an intermediate representation to allow processing of parsed\n data (we in fact have two, both [JsonML]: a markdown tree and an HTML tree)\n\n * being easily extensible to add new dialects without having to\n rewrite the entire parsing mechanics\n\n * having a good test suite. The only test suites we could find tested\n massive blocks of input, and passing depended on outputting the HTML\n with exactly the same whitespace as the original implementation\n\n[JsonML]: http://jsonml.org/ \"JSON Markup Language\"\n\n## Installation\n\nJust the `markdown` library:\n\n npm install markdown\n\nOptionally, install `md2html` into your path\n\n npm install -g markdown\n\n## Usage\n\n### Node\n\nThe simple way to use it with node is:\n\n```js\nvar markdown = require( \"markdown\" ).markdown;\nconsole.log( markdown.toHTML( \"Hello *World*!\" ) );\n```\n\n### Browser\n\nIt also works in a browser; here is a complete example:\n\n```html\n\n\n
\n \n