{"_id":"html-md","_rev":"32-66193f60ea38ee62605c1f5cdcf33c46","name":"html-md","dist-tags":{"latest":"3.0.2"},"versions":{"2.0.0":{"name":"html-md","version":"2.0.0","keywords":["html","markdown","convert"],"author":{"url":"http://neocotic.com","name":"Alasdair Mercer","email":"mercer.alasdair@gmail.com"},"_id":"html-md@2.0.0","maintainers":[{"name":"neocotic","email":"mercer.alasdair@gmail.com"}],"homepage":"http://neocotic.com/html.md","bugs":{"url":"https://github.com/neocotic/html.md/issues"},"bin":{"md":"./bin/md"},"dist":{"shasum":"7c91666bb1246a65596ec113d32ab941cd595237","tarball":"https://registry.npmjs.org/html-md/-/html-md-2.0.0.tgz","integrity":"sha512-nKnnFVOugAWum3EUCq746reGL7Z+wq10hlCX+dUZj15QOSfaMqSRIhtRtOty7rWPPSzb4tSydSmQZ8TCUPfefA==","signatures":[{"sig":"MEUCIDwxfibLtWFZ0cxFUwGFuJnPfGfchN5+kLIbzYvBncK/AiEAjAX8CDzdBrENF6Zk/GFBinhfU/RKvPU8lG6w2lxUXis=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/md","readme":"     __      __               ___                      __     \n    /\\ \\    /\\ \\__           /\\_ \\                    /\\ \\    \n    \\ \\ \\___\\ \\ ,_\\   ___ ___\\//\\ \\        ___ ___    \\_\\ \\   \n     \\ \\  _ `\\ \\ \\/ /' __` __`\\\\ \\ \\     /' __` __`\\  /'_` \\  \n      \\ \\ \\ \\ \\ \\ \\_/\\ \\/\\ \\/\\ \\\\_\\ \\_ __/\\ \\/\\ \\/\\ \\/\\ \\L\\ \\ \n       \\ \\_\\ \\_\\ \\__\\ \\_\\ \\_\\ \\_\\\\____\\\\_\\ \\_\\ \\_\\ \\_\\ \\___,_\\\n        \\/_/\\/_/\\/__/\\/_/\\/_/\\/_//____//_/\\/_/\\/_/\\/_/\\/__,_ /\n\n[html.md][] is a pure JavaScript library for converting [HTML][] in to valid\n[Markdown][].\n\n[![Build Status](https://secure.travis-ci.org/neocotic/html.md.png)](http://travis-ci.org/neocotic/html.md)\n\n[html.md][] can be used normally in any browser as well as in the [node.js][]\nenvironment where it also provides a command line interface.\n\n## Install\n\nInstall from [npm][]:\n\n``` bash\n$ npm install html-md\n```\n\n## Usage\n\n```\nUsage: md [options] [ -e html | file.html ] [arguments]\n\nOptions:\n  -a, --absolute     always use absolute URLs for links\n  -d, --debug        print additional debug information\n  -e, --eval         pass a string from the command line as input\n  -h, --help         display this help information\n  -l, --long-ext     use long extension for Markdown files\n  -o, --output DIR   set the output directory for converted Markdown\n  -p, --print        print out the converted Markdown\n  -v, --version      display the version number\n```\n\n### Examples\n\nProvide HTML to be converted and print it out into the terminal:\n\n``` bash\n$ md -ep \"I <b>love</b> <a href='https://github.com/neocotic/html.md'>html.md</a>\"\nI **love** [html.md](https://github.com/neocotic/html.md)\n```\n\nConvert HTML files and output them into another directory:\n\n``` bash\n$ md -o ./markdown ./html/*.html\n```\n\nConvert all `.html` files in the current directory into `.markdown` files:\n\n``` bash\n$ md -l .\n```\n\n## Programmatically\n\n`md(html[, options])` is used primarily:\n\n``` html\n<script src=\"dist/md.min.js\"></script>\n<script>\n  var markdown = md(document.querySelector('.content'))\n  console.log(markdown)\n</script>\n```\n\n### Options\n\nThe following options are recognised by this method (all of which are optional);\n\n<table>\n  <tr>\n    <th>Property</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td>absolute</td>\n    <td>All links are parsed with absolute URLs</td>\n  </tr>\n  <tr>\n    <td>debug</td>\n    <td>Prepends additional debug information to the Markdown output</td>\n  </tr>\n</table>\n\n### Miscellaneous\n\n`md.noConflict()` returns `md` in a no-conflict state, reallocating the `md`\nglobal variable name to its previous owner, where possible.\n\n`md.VERSION` returns the current version.\n\n## Bugs\n\nIf you have any problems with this library or would like to see the changes\ncurrently in development you can do so here;\n\nhttps://github.com/neocotic/html.md/issues\n\n## Questions?\n\nTake a look at `docs/md.html` to get a better understanding of what the code is\ndoing.\n\nIf that doesn't help, feel free to follow me on Twitter, [@neocotic][].\n\nHowever, if you want more information or examples of using this library please\nvisit the project's homepage;\n\nhttp://neocotic.com/html.md\n\n[@neocotic]: https://twitter.com/neocotic\n[html]: http://en.wikipedia.org/wiki/HTML\n[html.md]: http://neocotic.com/html.md\n[markdown]: http://en.wikipedia.org/wiki/Markdown\n[node.js]: http://nodejs.org\n[npm]: http://npmjs.org","engines":{"node":"*"},"scripts":{"test":"tap ./test"},"_npmUser":{"name":"neocotic","email":"mercer.alasdair@gmail.com"},"licenses":[{"url":"https://github.com/neocotic/html.md/raw/master/LICENSE.md","type":"MIT"}],"deprecated":"Package has been moved to Europa: https://www.npmjs.com/package/europa","repository":{"url":"git://github.com/neocotic/html.md.git","type":"git"},"_npmVersion":"1.1.65","description":"JavaScript library for converting HTML in to valid Markdown","directories":{},"dependencies":{"jsdom":"0.2.x","optparse":"1.0.x","coffee-script":"1.4.x"},"readmeFilename":"README.md","devDependencies":{"tap":"0.3.x","docco":"0.4.x","uglify-js":"2.2.x"}},"2.0.1":{"name":"html-md","version":"2.0.1","keywords":["html","markdown","convert"],"author":{"url":"http://neocotic.com","name":"Alasdair Mercer","email":"mercer.alasdair@gmail.com"},"_id":"html-md@2.0.1","maintainers":[{"name":"neocotic","email":"mercer.alasdair@gmail.com"}],"homepage":"http://neocotic.com/html.md","bugs":{"url":"https://github.com/neocotic/html.md/issues"},"bin":{"md":"./bin/md"},"dist":{"shasum":"1d8abc646b27d0734f3b0ae452248035cce57754","tarball":"https://registry.npmjs.org/html-md/-/html-md-2.0.1.tgz","integrity":"sha512-9K39SCyx01fxteJpgJ+pfLQ2fiLBasAv3o/grSdcySmhUFKx4qpbRazIblE024ZdIrj8eczO902qqflDLenw3w==","signatures":[{"sig":"MEUCIAq1jrCRLxhcZmcqPoZjLPQn0J1V/LlxZND70yy3DrlVAiEAtBFLBZpq2Iuw74psABByvkH0Jqb2bs8LOSKNmVDdakc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/md","readme":"     __      __               ___                      __     \n    /\\ \\    /\\ \\__           /\\_ \\                    /\\ \\    \n    \\ \\ \\___\\ \\ ,_\\   ___ ___\\//\\ \\        ___ ___    \\_\\ \\   \n     \\ \\  _ `\\ \\ \\/ /' __` __`\\\\ \\ \\     /' __` __`\\  /'_` \\  \n      \\ \\ \\ \\ \\ \\ \\_/\\ \\/\\ \\/\\ \\\\_\\ \\_ __/\\ \\/\\ \\/\\ \\/\\ \\L\\ \\ \n       \\ \\_\\ \\_\\ \\__\\ \\_\\ \\_\\ \\_\\\\____\\\\_\\ \\_\\ \\_\\ \\_\\ \\___,_\\\n        \\/_/\\/_/\\/__/\\/_/\\/_/\\/_//____//_/\\/_/\\/_/\\/_/\\/__,_ /\n\n[html.md][] is a pure JavaScript library for converting [HTML][] in to valid\n[Markdown][].\n\n[![Build Status](https://secure.travis-ci.org/neocotic/html.md.png)](http://travis-ci.org/neocotic/html.md)\n\n[html.md][] can be used normally in any browser as well as in the [node.js][]\nenvironment where it also provides a command line interface.\n\n## Install\n\nInstall from [npm][]:\n\n``` bash\n$ npm install html-md\n```\n\n## Usage\n\n```\nUsage: md [options] [ -e html | file.html ] [arguments]\n\nOptions:\n  -a, --absolute     always use absolute URLs for links\n  -d, --debug        print additional debug information\n  -e, --eval         pass a string from the command line as input\n  -h, --help         display this help information\n  -l, --long-ext     use long extension for Markdown files\n  -o, --output DIR   set the output directory for converted Markdown\n  -p, --print        print out the converted Markdown\n  -v, --version      display the version number\n```\n\n### Examples\n\nProvide HTML to be converted and print it out into the terminal:\n\n``` bash\n$ md -ep \"I <b>love</b> <a href='https://github.com/neocotic/html.md'>html.md</a>\"\nI **love** [html.md](https://github.com/neocotic/html.md)\n```\n\nConvert HTML files and output them into another directory:\n\n``` bash\n$ md -o ./markdown ./html/*.html\n```\n\nConvert all `.html` files in the current directory into `.markdown` files:\n\n``` bash\n$ md -l .\n```\n\n## Programmatically\n\n`md(html[, options])` is used primarily:\n\n``` html\n<script src=\"dist/md.min.js\"></script>\n<script>\n  var markdown = md(document.querySelector('.content'))\n  console.log(markdown)\n</script>\n```\n\n### Options\n\nThe following options are recognised by this method (all of which are optional);\n\n<table>\n  <tr>\n    <th>Property</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td>absolute</td>\n    <td>All links are parsed with absolute URLs</td>\n  </tr>\n  <tr>\n    <td>debug</td>\n    <td>Prepends additional debug information to the Markdown output</td>\n  </tr>\n</table>\n\n### Miscellaneous\n\n`md.noConflict()` returns `md` in a no-conflict state, reallocating the `md`\nglobal variable name to its previous owner, where possible.\n\n`md.VERSION` returns the current version.\n\n## Bugs\n\nIf you have any problems with this library or would like to see the changes\ncurrently in development you can do so here;\n\nhttps://github.com/neocotic/html.md/issues\n\n## Questions?\n\nTake a look at `docs/md.html` to get a better understanding of what the code is\ndoing.\n\nIf that doesn't help, feel free to follow me on Twitter, [@neocotic][].\n\nHowever, if you want more information or examples of using this library please\nvisit the project's homepage;\n\nhttp://neocotic.com/html.md\n\n[@neocotic]: https://twitter.com/neocotic\n[html]: http://en.wikipedia.org/wiki/HTML\n[html.md]: http://neocotic.com/html.md\n[markdown]: http://en.wikipedia.org/wiki/Markdown\n[node.js]: http://nodejs.org\n[npm]: http://npmjs.org","engines":{"node":"*"},"scripts":{"test":"tap ./test"},"_npmUser":{"name":"neocotic","email":"mercer.alasdair@gmail.com"},"licenses":[{"url":"https://github.com/neocotic/html.md/raw/master/LICENSE.md","type":"MIT"}],"deprecated":"Package has been moved to Europa: https://www.npmjs.com/package/europa","repository":{"url":"git://github.com/neocotic/html.md.git","type":"git"},"_npmVersion":"1.1.65","description":"JavaScript library for converting HTML in to valid Markdown","directories":{},"dependencies":{"jsdom":"0.2.x","optparse":"1.0.x","coffee-script":"1.4.x"},"readmeFilename":"README.md","devDependencies":{"tap":"0.3.x","docco":"0.4.x","uglify-js":"2.2.x"}},"2.0.2":{"name":"html-md","version":"2.0.2","keywords":["html","markdown","convert"],"author":{"url":"http://neocotic.com","name":"Alasdair Mercer","email":"mercer.alasdair@gmail.com"},"_id":"html-md@2.0.2","maintainers":[{"name":"neocotic","email":"mercer.alasdair@gmail.com"}],"homepage":"http://neocotic.com/html.md","bugs":{"url":"https://github.com/neocotic/html.md/issues"},"bin":{"md":"./bin/md"},"man":["./docs/md.1"],"dist":{"shasum":"405e11fb7b6c65d3369acb11be54bac11bb647ce","tarball":"https://registry.npmjs.org/html-md/-/html-md-2.0.2.tgz","integrity":"sha512-3qFY9i13or18wabAl7KfXTWgPgNJ21FFjZ8bK7I4UY6W1N2m7Or310rDpbjX4rcsJKB4HkM50ySR21hAHVB9dg==","signatures":[{"sig":"MEUCIFTTN5ERoIIk0ym8HTVzkWc/o1dRGQGdO7m48x9uq93CAiEAn9rfKLD9BiJit2HwQX4dHPxzhiMWZCFTUqU1Nt2PqIY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/md","readme":"     __      __               ___                      __     \n    /\\ \\    /\\ \\__           /\\_ \\                    /\\ \\    \n    \\ \\ \\___\\ \\ ,_\\   ___ ___\\//\\ \\        ___ ___    \\_\\ \\   \n     \\ \\  _ `\\ \\ \\/ /' __` __`\\\\ \\ \\     /' __` __`\\  /'_` \\  \n      \\ \\ \\ \\ \\ \\ \\_/\\ \\/\\ \\/\\ \\\\_\\ \\_ __/\\ \\/\\ \\/\\ \\/\\ \\L\\ \\ \n       \\ \\_\\ \\_\\ \\__\\ \\_\\ \\_\\ \\_\\\\____\\\\_\\ \\_\\ \\_\\ \\_\\ \\___,_\\\n        \\/_/\\/_/\\/__/\\/_/\\/_/\\/_//____//_/\\/_/\\/_/\\/_/\\/__,_ /\n\n[html.md][] is a pure JavaScript library for converting [HTML][] in to valid\n[Markdown][].\n\n[![Build Status](https://secure.travis-ci.org/neocotic/html.md.png)](http://travis-ci.org/neocotic/html.md)\n\n[html.md][] can be used normally in any browser as well as in the [node.js][]\nenvironment where it also provides a command line interface.\n\n## Install\n\nInstall from [npm][]:\n\n``` bash\n$ npm install html-md\n```\n\n## Usage\n\n```\nUsage: md [options] [ -e html | file.html ] [arguments]\n\nOptions:\n  -a, --absolute     always use absolute URLs for links\n  -d, --debug        print additional debug information\n  -e, --eval         pass a string from the command line as input\n  -h, --help         display this help information\n  -l, --long-ext     use long extension for Markdown files\n  -o, --output DIR   set the output directory for converted Markdown\n  -p, --print        print out the converted Markdown\n  -v, --version      display the version number\n```\n\n### Examples\n\nProvide HTML to be converted and print it out into the terminal:\n\n``` bash\n$ md -ep \"I <b>love</b> <a href='https://github.com/neocotic/html.md'>html.md</a>\"\nI **love** [html.md](https://github.com/neocotic/html.md)\n```\n\nConvert HTML files and output them into another directory:\n\n``` bash\n$ md -o ./markdown ./html/*.html\n```\n\nConvert all `.html` files in the current directory into `.markdown` files:\n\n``` bash\n$ md -l .\n```\n\n## Programmatically\n\n`md(html[, options])` is used primarily:\n\n``` html\n<script src=\"dist/md.min.js\"></script>\n<script>\n  var markdown = md(document.querySelector('.content'))\n  console.log(markdown)\n</script>\n```\n\n### Options\n\nThe following options are recognised by this method (all of which are optional);\n\n<table>\n  <tr>\n    <th>Property</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td>absolute</td>\n    <td>All links are parsed with absolute URLs</td>\n  </tr>\n  <tr>\n    <td>debug</td>\n    <td>Prepends additional debug information to the Markdown output</td>\n  </tr>\n</table>\n\n### Miscellaneous\n\n`md.noConflict()` returns `md` in a no-conflict state, reallocating the `md`\nglobal variable name to its previous owner, where possible.\n\n`md.VERSION` returns the current version.\n\n## Bugs\n\nIf you have any problems with this library or would like to see the changes\ncurrently in development you can do so here;\n\nhttps://github.com/neocotic/html.md/issues\n\n## Questions?\n\nTake a look at `docs/md.html` to get a better understanding of what the code is\ndoing.\n\nIf that doesn't help, feel free to follow me on Twitter, [@neocotic][].\n\nHowever, if you want more information or examples of using this library please\nvisit the project's homepage;\n\nhttp://neocotic.com/html.md\n\n[@neocotic]: https://twitter.com/neocotic\n[html]: http://en.wikipedia.org/wiki/HTML\n[html.md]: http://neocotic.com/html.md\n[markdown]: http://en.wikipedia.org/wiki/Markdown\n[node.js]: http://nodejs.org\n[npm]: http://npmjs.org","engines":{"node":"*"},"scripts":{"test":"tap ./test"},"_npmUser":{"name":"neocotic","email":"mercer.alasdair@gmail.com"},"licenses":[{"url":"https://github.com/neocotic/html.md/raw/master/LICENSE.md","type":"MIT"}],"deprecated":"Package has been moved to Europa: https://www.npmjs.com/package/europa","repository":{"url":"git://github.com/neocotic/html.md.git","type":"git"},"_npmVersion":"1.1.65","description":"JavaScript library for converting HTML in to valid Markdown","directories":{},"dependencies":{"jsdom":"0.2.x","optparse":"1.0.x","coffee-script":"1.4.x"},"readmeFilename":"README.md","devDependencies":{"tap":"0.3.x","docco":"0.4.x","uglify-js":"2.2.x"}},"2.1.0":{"name":"html-md","version":"2.1.0","keywords":["html","markdown","convert"],"author":{"url":"http://neocotic.com","name":"Alasdair Mercer","email":"mercer.alasdair@gmail.com"},"_id":"html-md@2.1.0","maintainers":[{"name":"neocotic","email":"mercer.alasdair@gmail.com"}],"homepage":"http://neocotic.com/html.md","bugs":{"url":"https://github.com/neocotic/html.md/issues"},"bin":{"md":"bin/md"},"man":["man/md.1"],"dist":{"shasum":"f19fece3677bf7d6f976ad007f4f654d8ad5c2a4","tarball":"https://registry.npmjs.org/html-md/-/html-md-2.1.0.tgz","integrity":"sha512-gANlEP3iCxS4ppPA552M7bz3AkNaEO+ikHjA/XAOgpAqrzqGmWq7HEuIk2Pc9KsYqlcIw02xQ/BMQ4v7FglBKg==","signatures":[{"sig":"MEUCIELEIE8jjmJY0UHrjgbEF5jtUS19Rsc4hw4b+3z92JgMAiEAzvB9ymGMDQv1D8mPsK9RMEJuUNvNaOxR8bTsh3cDezU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/md","_from":".","readme":"     __      __               ___                      __     \n    /\\ \\    /\\ \\__           /\\_ \\                    /\\ \\    \n    \\ \\ \\___\\ \\ ,_\\   ___ ___\\//\\ \\        ___ ___    \\_\\ \\   \n     \\ \\  _ `\\ \\ \\/ /' __` __`\\\\ \\ \\     /' __` __`\\  /'_` \\  \n      \\ \\ \\ \\ \\ \\ \\_/\\ \\/\\ \\/\\ \\\\_\\ \\_ __/\\ \\/\\ \\/\\ \\/\\ \\L\\ \\ \n       \\ \\_\\ \\_\\ \\__\\ \\_\\ \\_\\ \\_\\\\____\\\\_\\ \\_\\ \\_\\ \\_\\ \\___,_\\\n        \\/_/\\/_/\\/__/\\/_/\\/_/\\/_//____//_/\\/_/\\/_/\\/_/\\/__,_ /\n\n[html.md][] is a pure JavaScript library for converting [HTML][] in to valid [Markdown][].\n\n[![Build Status](https://secure.travis-ci.org/neocotic/html.md.png)](http://travis-ci.org/neocotic/html.md)\n\n[html.md][] can be used normally in any browser as well as in the [node.js][] environment where it\nalso provides a command line interface.\n\n* [Install](#install)\n* [Examples](#examples)\n* [Usage](#usage)\n* [API](#api)\n   * [md](#mdhtml-options)\n   * [Miscellaneous](#miscellaneous)\n* [Windows](#windows)\n* [Bugs](#bugs)\n* [Questions](#questions)\n\n## Install\n\nInstall using the package manager for your desired environment(s):\n\n``` bash\n# for node.js:\n$ npm install html-md\n# OR; for the browser:\n$ bower install html-md\n```\n\n## Examples\n\nIn the browser:\n\n``` html\n<html>\n  <head>\n    <script src=\"/path/to/md.min.js\"></script>\n    <script>\n      (function () {\n        var body = document.getElementsByTagName('body')[0];\n        console.log(md(body));\n      }());\n    </script>\n  </head>\n  <body>\n    <h1>Hello, World!</h1>\n    <p>My tasks for today:</p>\n    <ul>\n      <li>Learn all about <a href=\"http://neocotic.com/html.md\">html.md</a></li>\n      <li>Tell everyone how <strong>awesome</strong> it is!</li>\n    </ul>\n  </body>\n</html>\n```\n\nIn [node.js][]:\n\n``` javascript\nvar md = require('md');\n\nconsole.log(md('I <em>love</em> html.md!'));\n```\n\nThe fantastic [jsdom][] library is used in this environment in order to simulate a working DOM to\nbe traversed and translated to Markdown (see the [Windows](#windows) section for important notes\nabout support for this platform).\n\nIn the terminal:\n\n``` bash\n# provide HTML to be converted and print it back out to stdout:\n$ md -epi \"I <b>love</b> <a href='http://neocotic.com/html.md'>html.md</a>\"\nI **love** [html.md](http://neocotic.com/html.md)\n# convert HTML files and output them into another directory:\n$ md -o ./markdown ./html/*.html\n# convert all HTML files in the current directory into Markdown files:\n$ md -l .\n```\n\n## Usage\n\n    Usage: md [options] [ -e html | <file ...> ]\n\n    Options:\n\n      -h, --help          output usage information\n      -V, --version       output the version number\n      -a, --absolute      always use absolute URLs for links\n      -d, --debug         print additional debug information\n      -e, --eval          pass a string from the command line as input\n      -i, --inline        generate inline style links\n      -l, --long-ext      use long extension for Markdown files\n      -o, --output <dir>  set the output directory for converted Markdown\n      -p, --print         print out the converted Markdown\n\n## API\n\n### md(html, [options])\nParses the HTML into a valid [Markdown][] string. The `html` can either be an HTML string or DOM\nelement.\n\n``` javascript\nconsole.log(md('I <strong>love</strong> html.md!')); // \"I **love** html.md!\"\nconsole.log(md(document.querySelector('p')));        // \"Lorem ipsum, *baby*!\"\n```\n\n#### Options\n\nThe following options are recognised by this method (all of which are optional);\n\n<table>\n  <tr>\n    <th>Property</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td>absolute</td>\n    <td>All links are parsed with absolute URLs</td>\n  </tr>\n  <tr>\n    <td>debug</td>\n    <td>Prepends additional debug information to the Markdown output</td>\n  </tr>\n  <tr>\n    <td>inline</td>\n    <td>All links are generated using the inline style</td>\n  </tr>\n</table>\n\n### Miscellaneous\n\n#### `noConflict()`\nReturns `md` in a no-conflict state, reallocating the `md` global variable name to its previous\nowner, where possible.\n\nThis is really just intended for use within a browser.\n\n``` html\n<head>\n  <script src=\"/path/to/conflict-lib.js\"></script>\n  <script src=\"/path/to/md.min.js\"></script>\n  <script>\n    var mdNC = md.noConflict();\n    // Conflicting lib works again and use mdNC for this library onwards...\n  </script>\n</head>\n```\n\n#### `version`\nThe current version of `md`.\n\n``` javascript\nconsole.log(md.version); // \"2.1.0\"\n```\n\n## Windows\n\n*This section is only relevant for [node.js][] users and does not affect browsers.*\n\nA lot of care has been put in to ensure [html.md][] runs well on Windows. Unfortunately, one of the\ndependencies of the [jsdom][] library, which we depend on to emulate a DOM within the [node.js][]\nenvironment, does not build well on Windows systems since it's built using \"native modules\" that\nare compiled during installation. [Contextify][], the inherited dependency in question, is used to\nrun `<script>` contents safely in a sandbox environment and is required to properly parse DOM\nobjects into valid [Markdown][].\n\nFortunately, the author has documented some techniques to get it building on your Windows system in\na [Windows installation guide][].\n\n## Bugs\n\nIf you have any problems with this library or would like to see the changes currently in\ndevelopment you can do so here;\n\nhttps://github.com/neocotic/html.md/issues\n\n## Questions?\n\nTake a look at `docs/*` to get a better understanding of what the code is doing.\n\nIf that doesn't help, feel free to follow me on Twitter, [@neocotic][].\n\nHowever, if you want more information or examples of using this library please visit the project's\nhomepage;\n\nhttp://neocotic.com/html.md\n\n[@neocotic]: https://twitter.com/neocotic\n[contextify]: https://github.com/brianmcd/contextify\n[html]: http://en.wikipedia.org/wiki/HTML\n[html.md]: http://neocotic.com/html.md\n[jsdom]: https://github.com/tmpvar/jsdom\n[markdown]: http://en.wikipedia.org/wiki/Markdown\n[node.js]: http://nodejs.org\n[windows installation guide]: https://github.com/brianmcd/contextify/wiki/Windows-Installation-Guide\n","scripts":{"test":"grunt test"},"_npmUser":{"name":"neocotic","email":"mercer.alasdair@gmail.com"},"licenses":[{"url":"https://github.com/neocotic/html.md/raw/master/LICENSE.md","type":"MIT"}],"deprecated":"Package has been moved to Europa: https://www.npmjs.com/package/europa","repository":{"url":"git://github.com/neocotic/html.md.git","type":"git"},"_npmVersion":"1.2.18","description":"JavaScript library for converting HTML in to valid Markdown","directories":{},"dependencies":{"jsdom":"~0.6.0","fs-extra":"~0.6.0","commander":"~1.1.1"},"readmeFilename":"README.md","devDependencies":{"grunt":"~0.4.1","grunt-docco":"~0.2.0","grunt-contrib-clean":"~0.4.1","grunt-contrib-coffee":"~0.7.0","grunt-contrib-uglify":"~0.2.0","grunt-contrib-nodeunit":"~0.1.2"}},"2.1.1":{"name":"html-md","version":"2.1.1","keywords":["html","markdown","convert"],"author":{"url":"http://neocotic.com","name":"Alasdair Mercer","email":"mercer.alasdair@gmail.com"},"_id":"html-md@2.1.1","maintainers":[{"name":"neocotic","email":"mercer.alasdair@gmail.com"}],"homepage":"http://neocotic.com/html.md","bugs":{"url":"https://github.com/neocotic/html.md/issues"},"bin":{"md":"bin/md"},"man":["man/md.1"],"dist":{"shasum":"08702f68125e7d2e838feadbfd69e4af735a6f15","tarball":"https://registry.npmjs.org/html-md/-/html-md-2.1.1.tgz","integrity":"sha512-YygI5VL1fMCOAErAENtDb6JUfmJKh7oQ5BCWxE6cjN98uCmksAp2P6SaqrdlygOqyrRt10FnJoXeTjcVksqzag==","signatures":[{"sig":"MEUCIQC6zYX4f9fIcflpU2mv6WbApRvamM4jjm4VxKPL7CReQAIgKnn+ClvWWWwAVmtqO4HynvobNyn76sFPTocRzgaPlH0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/md","_from":".","readme":"     __      __               ___                      __     \n    /\\ \\    /\\ \\__           /\\_ \\                    /\\ \\    \n    \\ \\ \\___\\ \\ ,_\\   ___ ___\\//\\ \\        ___ ___    \\_\\ \\   \n     \\ \\  _ `\\ \\ \\/ /' __` __`\\\\ \\ \\     /' __` __`\\  /'_` \\  \n      \\ \\ \\ \\ \\ \\ \\_/\\ \\/\\ \\/\\ \\\\_\\ \\_ __/\\ \\/\\ \\/\\ \\/\\ \\L\\ \\ \n       \\ \\_\\ \\_\\ \\__\\ \\_\\ \\_\\ \\_\\\\____\\\\_\\ \\_\\ \\_\\ \\_\\ \\___,_\\\n        \\/_/\\/_/\\/__/\\/_/\\/_/\\/_//____//_/\\/_/\\/_/\\/_/\\/__,_ /\n\n[html.md][] is a pure JavaScript library for converting [HTML][] in to valid [Markdown][].\n\n[![Build Status](https://secure.travis-ci.org/neocotic/html.md.png)](http://travis-ci.org/neocotic/html.md)\n\n[html.md][] can be used normally in any browser as well as in the [node.js][] environment where it\nalso provides a command line interface.\n\n* [Install](#install)\n* [Examples](#examples)\n* [Usage](#usage)\n* [API](#api)\n   * [md](#mdhtml-options)\n   * [Miscellaneous](#miscellaneous)\n* [Windows](#windows)\n* [Bugs](#bugs)\n* [Questions](#questions)\n\n## Install\n\nInstall using the package manager for your desired environment(s):\n\n``` bash\n# for node.js:\n$ npm install html-md\n# OR; for the browser:\n$ bower install html-md\n```\n\n## Examples\n\nIn the browser:\n\n``` html\n<html>\n  <head>\n    <script src=\"/path/to/md.min.js\"></script>\n    <script>\n      (function () {\n        var body = document.getElementsByTagName('body')[0];\n        console.log(md(body));\n      }());\n    </script>\n  </head>\n  <body>\n    <h1>Hello, World!</h1>\n    <p>My tasks for today:</p>\n    <ul>\n      <li>Learn all about <a href=\"http://neocotic.com/html.md\">html.md</a></li>\n      <li>Tell everyone how <strong>awesome</strong> it is!</li>\n    </ul>\n  </body>\n</html>\n```\n\nIn [node.js][]:\n\n``` javascript\nvar md = require('html-md');\n\nconsole.log(md('I <em>love</em> html.md!'));\n```\n\nThe fantastic [jsdom][] library is used in this environment in order to simulate a working DOM to\nbe traversed and translated to Markdown (see the [Windows](#windows) section for important notes\nabout support for this platform).\n\nIn the terminal:\n\n``` bash\n# provide HTML to be converted and print it back out to stdout:\n$ md -epi \"I <b>love</b> <a href='http://neocotic.com/html.md'>html.md</a>\"\nI **love** [html.md](http://neocotic.com/html.md)\n# convert HTML files and output them into another directory:\n$ md -o ./markdown ./html/*.html\n# convert all HTML files in the current directory into Markdown files:\n$ md -l .\n```\n\n## Usage\n\n    Usage: md [options] [ -e html | <file ...> ]\n\n    Options:\n\n      -h, --help          output usage information\n      -V, --version       output the version number\n      -a, --absolute      always use absolute URLs for links and images\n      -b, --base <url>    set base URL to resolve relative URLs from\n      -d, --debug         print additional debug information\n      -e, --eval          pass a string from the command line as input\n      -i, --inline        generate inline style links\n      -l, --long-ext      use long extension for Markdown files\n      -o, --output <dir>  set the output directory for converted Markdown\n      -p, --print         print out the converted Markdown\n\n## API\n\n### md(html, [options])\nParses the HTML into a valid [Markdown][] string. The `html` can either be an HTML string or DOM\nelement.\n\n``` javascript\nconsole.log(md('I <strong>love</strong> html.md!')); // \"I **love** html.md!\"\nconsole.log(md(document.querySelector('p')));        // \"Lorem ipsum, *baby*!\"\n```\n\n#### Options\n\nThe following options are recognised by this method (all of which are optional);\n\n<table>\n  <tr>\n    <th>Property</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td>absolute</td>\n    <td>All links and images are parsed with absolute URLs</td>\n  </tr>\n  <tr>\n    <td>base</td>\n    <td>All relative links and images are resolved from this URL</td>\n  </tr>\n  <tr>\n    <td>debug</td>\n    <td>Prepends additional debug information to the Markdown output</td>\n  </tr>\n  <tr>\n    <td>inline</td>\n    <td>All links are generated using the inline style</td>\n  </tr>\n</table>\n\n**Note:** The `base` option *only* works in the [node.js][] environment.\n\n### Miscellaneous\n\n#### `noConflict()`\nReturns `md` in a no-conflict state, reallocating the `md` global variable name to its previous\nowner, where possible.\n\nThis is really just intended for use within a browser.\n\n``` html\n<head>\n  <script src=\"/path/to/conflict-lib.js\"></script>\n  <script src=\"/path/to/md.min.js\"></script>\n  <script>\n    var mdNC = md.noConflict();\n    // Conflicting lib works again and use mdNC for this library onwards...\n  </script>\n</head>\n```\n\n#### `version`\nThe current version of `md`.\n\n``` javascript\nconsole.log(md.version); // \"2.1.1\"\n```\n\n## Windows\n\n*This section is only relevant for [node.js][] users and does not affect browsers.*\n\nA lot of care has been put in to ensure [html.md][] runs well on Windows. Unfortunately, one of the\ndependencies of the [jsdom][] library, which we depend on to emulate a DOM within the [node.js][]\nenvironment, does not build well on Windows systems since it's built using \"native modules\" that\nare compiled during installation. [Contextify][], the inherited dependency in question, is used to\nrun `<script>` contents safely in a sandbox environment and is required to properly parse DOM\nobjects into valid [Markdown][].\n\nFortunately, the author has documented some techniques to get it building on your Windows system in\na [Windows installation guide][].\n\n## Bugs\n\nIf you have any problems with this library or would like to see the changes currently in\ndevelopment you can do so here;\n\nhttps://github.com/neocotic/html.md/issues\n\n## Questions?\n\nTake a look at `docs/*` to get a better understanding of what the code is doing.\n\nIf that doesn't help, feel free to follow me on Twitter, [@neocotic][].\n\nHowever, if you want more information or examples of using this library please visit the project's\nhomepage;\n\nhttp://neocotic.com/html.md\n\n[@neocotic]: https://twitter.com/neocotic\n[contextify]: https://github.com/brianmcd/contextify\n[html]: http://en.wikipedia.org/wiki/HTML\n[html.md]: http://neocotic.com/html.md\n[jsdom]: https://github.com/tmpvar/jsdom\n[markdown]: http://en.wikipedia.org/wiki/Markdown\n[node.js]: http://nodejs.org\n[windows installation guide]: https://github.com/brianmcd/contextify/wiki/Windows-Installation-Guide\n","scripts":{"test":"grunt test"},"_npmUser":{"name":"neocotic","email":"mercer.alasdair@gmail.com"},"licenses":[{"url":"https://github.com/neocotic/html.md/raw/master/LICENSE.md","type":"MIT"}],"deprecated":"Package has been moved to Europa: https://www.npmjs.com/package/europa","repository":{"url":"git://github.com/neocotic/html.md.git","type":"git"},"_npmVersion":"1.2.18","description":"JavaScript library for converting HTML in to valid Markdown","directories":{},"dependencies":{"jsdom":"~0.6.0","fs-extra":"~0.6.0","commander":"~1.1.1"},"readmeFilename":"README.md","devDependencies":{"grunt":"~0.4.1","grunt-docco":"~0.2.0","grunt-contrib-clean":"~0.4.1","grunt-contrib-coffee":"~0.7.0","grunt-contrib-uglify":"~0.2.0","grunt-contrib-nodeunit":"~0.1.2"}},"3.0.0":{"name":"html-md","version":"3.0.0","keywords":["html","markdown","convert"],"author":{"url":"http://neocotic.com","name":"Alasdair Mercer","email":"mercer.alasdair@gmail.com"},"_id":"html-md@3.0.0","maintainers":[{"name":"neocotic","email":"mercer.alasdair@gmail.com"}],"homepage":"http://neocotic.com/html.md","bugs":{"url":"https://github.com/neocotic/html.md/issues"},"bin":{"html-md":"bin/html-md"},"man":["man/html-md.1"],"dist":{"shasum":"e98d271a1624c60c0b4a207bbc9396bf8f65276e","tarball":"https://registry.npmjs.org/html-md/-/html-md-3.0.0.tgz","integrity":"sha512-YaOtlOToweDNK2WWEJAVzLCTSTztCtae7iT3sdI4BKD9fXMztOCWMIbntlAs4oYQJMdEsEsujgJ1GqOMnwaWCQ==","signatures":[{"sig":"MEYCIQD+WBwmcKcUkO4Mmka2zUzSiLL3nRTwOA0AisGuPmuhwwIhALJ2dKaXFNpeX8FJZdiQQGLl6T9LC/d2Og9xI2XqGAzU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/md","_from":".","readme":"     __      __               ___                      __     \n    /\\ \\    /\\ \\__           /\\_ \\                    /\\ \\    \n    \\ \\ \\___\\ \\ ,_\\   ___ ___\\//\\ \\        ___ ___    \\_\\ \\   \n     \\ \\  _ `\\ \\ \\/ /' __` __`\\\\ \\ \\     /' __` __`\\  /'_` \\  \n      \\ \\ \\ \\ \\ \\ \\_/\\ \\/\\ \\/\\ \\\\_\\ \\_ __/\\ \\/\\ \\/\\ \\/\\ \\L\\ \\ \n       \\ \\_\\ \\_\\ \\__\\ \\_\\ \\_\\ \\_\\\\____\\\\_\\ \\_\\ \\_\\ \\_\\ \\___,_\\\n        \\/_/\\/_/\\/__/\\/_/\\/_/\\/_//____//_/\\/_/\\/_/\\/_/\\/__,_ /\n\n[html.md][] is a pure JavaScript library for converting [HTML][] in to valid [Markdown][].\n\n[![Build Status](https://secure.travis-ci.org/neocotic/html.md.png)](http://travis-ci.org/neocotic/html.md)\n\n[html.md][] can be used normally in any browser as well as in the [node.js][] environment where it\nalso provides a command line interface.\n\n* [Install](#install)\n* [Examples](#examples)\n* [Usage](#usage)\n* [API](#api)\n   * [md](#mdhtml-options)\n   * [Miscellaneous](#miscellaneous)\n* [Windows](#windows)\n* [Bugs](#bugs)\n* [Questions](#questions)\n\n## Install\n\nInstall using the package manager for your desired environment(s):\n\n``` bash\n# for node.js:\n$ npm install html-md\n# OR; for the browser:\n$ bower install html-md\n```\n\n## Examples\n\nIn the browser:\n\n``` html\n<html>\n  <head>\n    <script src=\"/path/to/md.min.js\"></script>\n    <script>\n      (function () {\n        var body = document.getElementsByTagName('body')[0];\n        console.log(md(body));\n      }());\n    </script>\n  </head>\n  <body>\n    <h1>Hello, World!</h1>\n    <p>My tasks for today:</p>\n    <ul>\n      <li>Learn all about <a href=\"http://neocotic.com/html.md\">html.md</a></li>\n      <li>Tell everyone how <strong>awesome</strong> it is!</li>\n    </ul>\n  </body>\n</html>\n```\n\nIn [node.js][]:\n\n``` javascript\nvar md = require('html-md');\n\nconsole.log(md('I <em>love</em> html.md!'));\n```\n\nThe fantastic [jsdom][] library is used in this environment in order to simulate a working DOM to\nbe traversed and translated to Markdown (see the [Windows](#windows) section for important notes\nabout support for this platform).\n\nIn the terminal:\n\n``` bash\n# provide HTML to be converted and print it back out to stdout:\n$ html-md -epi \"I <b>love</b> <a href='http://neocotic.com/html.md'>html.md</a>\"\nI **love** [html.md](http://neocotic.com/html.md)\n# convert HTML files and output them into another directory:\n$ html-md -o ./markdown ./html/*.html\n# convert all HTML files in the current directory into Markdown files:\n$ html-md -l .\n```\n\n## Usage\n\n    Usage: html-md [options] [ -e html | <file ...> ]\n\n    Options:\n\n      -h, --help          output usage information\n      -V, --version       output the version number\n      -a, --absolute      always use absolute URLs for links and images\n      -b, --base <url>    set base URL to resolve relative URLs from\n      -d, --debug         print additional debug information\n      -e, --eval          pass a string from the command line as input\n      -i, --inline        generate inline style links\n      -l, --long-ext      use long extension for Markdown files\n      -o, --output <dir>  set the output directory for converted Markdown\n      -p, --print         print out the converted Markdown\n\n## API\n\n### md(html, [options])\nParses the HTML into a valid [Markdown][] string. The `html` can either be an HTML string or DOM\nelement.\n\n``` javascript\nconsole.log(md('I <strong>love</strong> html.md!')); // \"I **love** html.md!\"\nconsole.log(md(document.querySelector('p')));        // \"Lorem ipsum, *baby*!\"\n```\n\n#### Options\n\nThe following options are recognised by this method (all of which are optional);\n\n<table>\n  <tr>\n    <th>Property</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td>absolute</td>\n    <td>All links and images are parsed with absolute URLs</td>\n  </tr>\n  <tr>\n    <td>base</td>\n    <td>All relative links and images are resolved from this URL</td>\n  </tr>\n  <tr>\n    <td>debug</td>\n    <td>Prepends additional debug information to the Markdown output</td>\n  </tr>\n  <tr>\n    <td>inline</td>\n    <td>All links are generated using the inline style</td>\n  </tr>\n</table>\n\n**Note:** The `base` option *only* works in the [node.js][] environment.\n\n### Miscellaneous\n\n#### `noConflict()`\nReturns `md` in a no-conflict state, reallocating the `md` global variable name to its previous\nowner, where possible.\n\nThis is really just intended for use within a browser.\n\n``` html\n<head>\n  <script src=\"/path/to/conflict-lib.js\"></script>\n  <script src=\"/path/to/md.min.js\"></script>\n  <script>\n    var mdNC = md.noConflict();\n    // Conflicting lib works again and use mdNC for this library onwards...\n  </script>\n</head>\n```\n\n#### `version`\nThe current version of `md`.\n\n``` javascript\nconsole.log(md.version); // \"3.0.0\"\n```\n\n## Windows\n\n*This section is only relevant for [node.js][] users and does not affect browsers.*\n\nA lot of care has been put in to ensure [html.md][] runs well on Windows. Unfortunately, one of the\ndependencies of the [jsdom][] library, which we depend on to emulate a DOM within the [node.js][]\nenvironment, does not build well on Windows systems since it's built using \"native modules\" that\nare compiled during installation. [Contextify][], the inherited dependency in question, is used to\nrun `<script>` contents safely in a sandbox environment and is required to properly parse DOM\nobjects into valid [Markdown][].\n\nFortunately, the author has documented some techniques to get it building on your Windows system in\na [Windows installation guide][].\n\n## Bugs\n\nIf you have any problems with this library or would like to see the changes currently in\ndevelopment you can do so here;\n\nhttps://github.com/neocotic/html.md/issues\n\n## Questions?\n\nTake a look at `docs/*` to get a better understanding of what the code is doing.\n\nIf that doesn't help, feel free to follow me on Twitter, [@neocotic][].\n\nHowever, if you want more information or examples of using this library please visit the project's\nhomepage;\n\nhttp://neocotic.com/html.md\n\n[@neocotic]: https://twitter.com/neocotic\n[contextify]: https://github.com/brianmcd/contextify\n[html]: http://en.wikipedia.org/wiki/HTML\n[html.md]: http://neocotic.com/html.md\n[jsdom]: https://github.com/tmpvar/jsdom\n[markdown]: http://en.wikipedia.org/wiki/Markdown\n[node.js]: http://nodejs.org\n[windows installation guide]: https://github.com/brianmcd/contextify/wiki/Windows-Installation-Guide\n","scripts":{"test":"grunt test"},"_npmUser":{"name":"neocotic","email":"mercer.alasdair@gmail.com"},"licenses":[{"url":"https://github.com/neocotic/html.md/raw/master/LICENSE.md","type":"MIT"}],"deprecated":"Package has been moved to Europa: https://www.npmjs.com/package/europa","repository":{"url":"git://github.com/neocotic/html.md.git","type":"git"},"_npmVersion":"1.3.5","description":"JavaScript library for converting HTML in to valid Markdown","directories":{},"dependencies":{"jsdom":"~0.8.3","fs-extra":"~0.6.3","commander":"~2.0.0"},"readmeFilename":"README.md","devDependencies":{"grunt":"~0.4.1","grunt-docco":"~0.2.0","grunt-contrib-clean":"~0.5.0","grunt-contrib-coffee":"~0.7.0","grunt-contrib-uglify":"~0.2.2","grunt-contrib-nodeunit":"~0.2.0"}},"3.0.1":{"name":"html-md","version":"3.0.1","keywords":["html","markdown","convert"],"author":{"url":"http://neocotic.com","name":"Alasdair Mercer","email":"mercer.alasdair@gmail.com"},"_id":"html-md@3.0.1","maintainers":[{"name":"neocotic","email":"mercer.alasdair@gmail.com"}],"homepage":"http://neocotic.com/html.md","bugs":{"url":"https://github.com/neocotic/html.md/issues"},"bin":{"html-md":"bin/html-md"},"man":["man/html-md.1"],"dist":{"shasum":"abfeebfab05d0e999e79e5b43e2dfe7f02d4d823","tarball":"https://registry.npmjs.org/html-md/-/html-md-3.0.1.tgz","integrity":"sha512-UauaK6nUm4RU/sg+fgqSpjbzJP6S9ftZIKbliu5eaXJ8W1bHxy6h9UgT0MUbbOrEr0ysPgb2pwLWpMpKok0pBA==","signatures":[{"sig":"MEUCIQCc3Tle8z4QZsJy4FhOt5aDsJ9Vknf3sel8O0/sA2MrnAIge9lc8639vctpdIN7Q+7qW2KSv/fgwotXpScsGf+5sfw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/md","_from":".","readme":"     __      __               ___                      __     \r\n    /\\ \\    /\\ \\__           /\\_ \\                    /\\ \\    \r\n    \\ \\ \\___\\ \\ ,_\\   ___ ___\\//\\ \\        ___ ___    \\_\\ \\   \r\n     \\ \\  _ `\\ \\ \\/ /' __` __`\\\\ \\ \\     /' __` __`\\  /'_` \\  \r\n      \\ \\ \\ \\ \\ \\ \\_/\\ \\/\\ \\/\\ \\\\_\\ \\_ __/\\ \\/\\ \\/\\ \\/\\ \\L\\ \\ \r\n       \\ \\_\\ \\_\\ \\__\\ \\_\\ \\_\\ \\_\\\\____\\\\_\\ \\_\\ \\_\\ \\_\\ \\___,_\\\r\n        \\/_/\\/_/\\/__/\\/_/\\/_/\\/_//____//_/\\/_/\\/_/\\/_/\\/__,_ /\r\n\r\n[html.md][] is a pure JavaScript library for converting [HTML][] in to valid [Markdown][].\r\n\r\n[![Build Status](https://secure.travis-ci.org/neocotic/html.md.png)](http://travis-ci.org/neocotic/html.md)\r\n\r\n[html.md][] can be used normally in any browser as well as in the [node.js][] environment where it\r\nalso provides a command line interface.\r\n\r\n* [Install](#install)\r\n* [Examples](#examples)\r\n* [Usage](#usage)\r\n* [API](#api)\r\n   * [md](#mdhtml-options)\r\n   * [Miscellaneous](#miscellaneous)\r\n* [Windows](#windows)\r\n* [Bugs](#bugs)\r\n* [Questions](#questions)\r\n\r\n## Install\r\n\r\nInstall using the package manager for your desired environment(s):\r\n\r\n``` bash\r\n# for node.js:\r\n$ npm install html-md\r\n# OR; for the browser:\r\n$ bower install html-md\r\n```\r\n\r\n## Examples\r\n\r\nIn the browser:\r\n\r\n``` html\r\n<html>\r\n  <head>\r\n    <script src=\"/path/to/md.min.js\"></script>\r\n    <script>\r\n      (function () {\r\n        var body = document.getElementsByTagName('body')[0];\r\n        console.log(md(body));\r\n      }());\r\n    </script>\r\n  </head>\r\n  <body>\r\n    <h1>Hello, World!</h1>\r\n    <p>My tasks for today:</p>\r\n    <ul>\r\n      <li>Learn all about <a href=\"http://neocotic.com/html.md\">html.md</a></li>\r\n      <li>Tell everyone how <strong>awesome</strong> it is!</li>\r\n    </ul>\r\n  </body>\r\n</html>\r\n```\r\n\r\nIn [node.js][]:\r\n\r\n``` javascript\r\nvar md = require('html-md');\r\n\r\nconsole.log(md('I <em>love</em> html.md!'));\r\n```\r\n\r\nThe fantastic [jsdom][] library is used in this environment in order to simulate a working DOM to\r\nbe traversed and translated to Markdown (see the [Windows](#windows) section for important notes\r\nabout support for this platform).\r\n\r\nIn the terminal:\r\n\r\n``` bash\r\n# provide HTML to be converted and print it back out to stdout:\r\n$ html-md -epi \"I <b>love</b> <a href='http://neocotic.com/html.md'>html.md</a>\"\r\nI **love** [html.md](http://neocotic.com/html.md)\r\n# convert HTML files and output them into another directory:\r\n$ html-md -o ./markdown ./html/*.html\r\n# convert all HTML files in the current directory into Markdown files:\r\n$ html-md -l .\r\n```\r\n\r\n## Usage\r\n\r\n    Usage: html-md [options] [ -e html | <file ...> ]\r\n\r\n    Options:\r\n\r\n      -h, --help          output usage information\r\n      -V, --version       output the version number\r\n      -a, --absolute      always use absolute URLs for links and images\r\n      -b, --base <url>    set base URL to resolve relative URLs from\r\n      -d, --debug         print additional debug information\r\n      -e, --eval          pass a string from the command line as input\r\n      -i, --inline        generate inline style links\r\n      -l, --long-ext      use long extension for Markdown files\r\n      -o, --output <dir>  set the output directory for converted Markdown\r\n      -p, --print         print out the converted Markdown\r\n\r\n## API\r\n\r\n### md(html, [options])\r\nParses the HTML into a valid [Markdown][] string. The `html` can either be an HTML string or DOM\r\nelement.\r\n\r\n``` javascript\r\nconsole.log(md('I <strong>love</strong> html.md!')); // \"I **love** html.md!\"\r\nconsole.log(md(document.querySelector('p')));        // \"Lorem ipsum, *baby*!\"\r\n```\r\n\r\n#### Options\r\n\r\nThe following options are recognised by this method (all of which are optional);\r\n\r\n<table>\r\n  <tr>\r\n    <th>Property</th>\r\n    <th>Description</th>\r\n  </tr>\r\n  <tr>\r\n    <td>absolute</td>\r\n    <td>All links and images are parsed with absolute URLs</td>\r\n  </tr>\r\n  <tr>\r\n    <td>base</td>\r\n    <td>All relative links and images are resolved from this URL</td>\r\n  </tr>\r\n  <tr>\r\n    <td>debug</td>\r\n    <td>Prepends additional debug information to the Markdown output</td>\r\n  </tr>\r\n  <tr>\r\n    <td>inline</td>\r\n    <td>All links are generated using the inline style</td>\r\n  </tr>\r\n</table>\r\n\r\n**Note:** The `base` option *only* works in the [node.js][] environment.\r\n\r\n### Miscellaneous\r\n\r\n#### `noConflict()`\r\nReturns `md` in a no-conflict state, reallocating the `md` global variable name to its previous\r\nowner, where possible.\r\n\r\nThis is really just intended for use within a browser.\r\n\r\n``` html\r\n<head>\r\n  <script src=\"/path/to/conflict-lib.js\"></script>\r\n  <script src=\"/path/to/md.min.js\"></script>\r\n  <script>\r\n    var mdNC = md.noConflict();\r\n    // Conflicting lib works again and use mdNC for this library onwards...\r\n  </script>\r\n</head>\r\n```\r\n\r\n#### `version`\r\nThe current version of `md`.\r\n\r\n``` javascript\r\nconsole.log(md.version); // \"3.0.1\"\r\n```\r\n\r\n## Windows\r\n\r\n*This section is only relevant for [node.js][] users and does not affect browsers.*\r\n\r\nA lot of care has been put in to ensure [html.md][] runs well on Windows. Unfortunately, one of the\r\ndependencies of the [jsdom][] library, which we depend on to emulate a DOM within the [node.js][]\r\nenvironment, does not build well on Windows systems since it's built using \"native modules\" that\r\nare compiled during installation. [Contextify][], the inherited dependency in question, is used to\r\nrun `<script>` contents safely in a sandbox environment and is required to properly parse DOM\r\nobjects into valid [Markdown][].\r\n\r\nFortunately, the author has documented some techniques to get it building on your Windows system in\r\na [Windows installation guide][].\r\n\r\n## Bugs\r\n\r\nIf you have any problems with this library or would like to see the changes currently in\r\ndevelopment you can do so here;\r\n\r\nhttps://github.com/neocotic/html.md/issues\r\n\r\n## Questions?\r\n\r\nTake a look at `docs/*` to get a better understanding of what the code is doing.\r\n\r\nIf that doesn't help, feel free to follow me on Twitter, [@neocotic][].\r\n\r\nHowever, if you want more information or examples of using this library please visit the project's\r\nhomepage;\r\n\r\nhttp://neocotic.com/html.md\r\n\r\n[@neocotic]: https://twitter.com/neocotic\r\n[contextify]: https://github.com/brianmcd/contextify\r\n[html]: http://en.wikipedia.org/wiki/HTML\r\n[html.md]: http://neocotic.com/html.md\r\n[jsdom]: https://github.com/tmpvar/jsdom\r\n[markdown]: http://en.wikipedia.org/wiki/Markdown\r\n[node.js]: http://nodejs.org\r\n[windows installation guide]: https://github.com/brianmcd/contextify/wiki/Windows-Installation-Guide\r\n","scripts":{"test":"grunt test"},"_npmUser":{"name":"neocotic","email":"mercer.alasdair@gmail.com"},"licenses":[{"url":"https://github.com/neocotic/html.md/raw/master/LICENSE.md","type":"MIT"}],"deprecated":"Package has been moved to Europa: https://www.npmjs.com/package/europa","repository":{"url":"git://github.com/neocotic/html.md.git","type":"git"},"_npmVersion":"1.2.17","description":"JavaScript library for converting HTML in to valid Markdown","directories":{},"dependencies":{"jsdom":"~0.8.3","fs-extra":"~0.6.3","commander":"~2.0.0"},"readmeFilename":"README.md","devDependencies":{"grunt":"~0.4.1","grunt-docco":"~0.2.0","grunt-contrib-clean":"~0.5.0","grunt-contrib-coffee":"~0.7.0","grunt-contrib-uglify":"~0.2.2","grunt-contrib-nodeunit":"~0.2.0"}},"3.0.2-alpha":{"name":"html-md","version":"3.0.2-alpha","keywords":["html","markdown","convert"],"author":{"url":"http://neocotic.com","name":"Alasdair Mercer","email":"mercer.alasdair@gmail.com"},"_id":"html-md@3.0.2-alpha","maintainers":[{"name":"neocotic","email":"mercer.alasdair@gmail.com"}],"homepage":"http://neocotic.com/html.md","bugs":{"url":"https://github.com/neocotic/html.md/issues"},"bin":{"htmlmd":"./bin/htmlmd"},"man":["./man/htmlmd.1"],"dist":{"shasum":"54c6952f753bd7c7533851a93fde8f2a498bbe81","tarball":"https://registry.npmjs.org/html-md/-/html-md-3.0.2-alpha.tgz","integrity":"sha512-CuukJlvWWrNlCOjnBQS3cxC4roWFEvBQmPJRrTL07vEtQTjGy9Hf75dXBLjArjwfELZ/pSxN5JxbiCGKbgkUcw==","signatures":[{"sig":"MEYCIQDl4wbFOvIF15Iv7p/8NSERfzH6hZWBQihl6qsY8zuLugIhANt60BkWTf9LlkRvnUHFRHcKpJD8aFWfITPf2KZ+Cskv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/md","_from":".","readme":"     __      __               ___                      __     \n    /\\ \\    /\\ \\__           /\\_ \\                    /\\ \\    \n    \\ \\ \\___\\ \\ ,_\\   ___ ___\\//\\ \\        ___ ___    \\_\\ \\   \n     \\ \\  _ `\\ \\ \\/ /' __` __`\\\\ \\ \\     /' __` __`\\  /'_` \\  \n      \\ \\ \\ \\ \\ \\ \\_/\\ \\/\\ \\/\\ \\\\_\\ \\_ __/\\ \\/\\ \\/\\ \\/\\ \\L\\ \\ \n       \\ \\_\\ \\_\\ \\__\\ \\_\\ \\_\\ \\_\\\\____\\\\_\\ \\_\\ \\_\\ \\_\\ \\___,_\\\n        \\/_/\\/_/\\/__/\\/_/\\/_/\\/_//____//_/\\/_/\\/_/\\/_/\\/__,_ /\n\n[html.md][] is a pure JavaScript library for converting [HTML][] in to valid [Markdown][].\n\n[![Build Status](https://secure.travis-ci.org/neocotic/html.md.png)](http://travis-ci.org/neocotic/html.md)\n\n[html.md][] can be used normally in any browser as well as in the [node.js][] environment where it\nalso provides a command line interface.\n\n* [Install](#install)\n* [Examples](#examples)\n* [Usage](#usage)\n* [API](#api)\n   * [md](#mdhtml-options)\n   * [Miscellaneous](#miscellaneous)\n* [Windows](#windows)\n* [Bugs](#bugs)\n* [Questions](#questions)\n\n## Install\n\nInstall using the package manager for your desired environment(s):\n\n``` bash\n# for node.js:\n$ npm install html-md\n# OR; for the browser:\n$ bower install html-md\n```\n\n## Examples\n\nIn the browser:\n\n``` html\n<html>\n  <head>\n    <script src=\"/path/to/md.min.js\"></script>\n    <script>\n      (function () {\n        var body = document.getElementsByTagName('body')[0];\n        console.log(md(body));\n      }());\n    </script>\n  </head>\n  <body>\n    <h1>Hello, World!</h1>\n    <p>My tasks for today:</p>\n    <ul>\n      <li>Learn all about <a href=\"http://neocotic.com/html.md\">html.md</a></li>\n      <li>Tell everyone how <strong>awesome</strong> it is!</li>\n    </ul>\n  </body>\n</html>\n```\n\nIn [node.js][]:\n\n``` javascript\nvar md = require('html-md');\n\nconsole.log(md('I <em>love</em> html.md!'));\n```\n\nThe fantastic [jsdom][] library is used in this environment in order to simulate a working DOM to\nbe traversed and translated to Markdown (see the [Windows](#windows) section for important notes\nabout support for this platform).\n\nIn the terminal:\n\n``` bash\n# provide HTML to be converted and print it back out to stdout:\n$ htmlmd -epi \"I <b>love</b> <a href='http://neocotic.com/html.md'>html.md</a>\"\nI **love** [html.md](http://neocotic.com/html.md)\n# convert HTML files and output them into another directory:\n$ htmlmd -o ./markdown ./html/*.html\n# convert all HTML files in the current directory into Markdown files:\n$ htmlmd -l .\n```\n\n## Usage\n\n    Usage: htmlmd [options] [ -e html | <file ...> ]\n\n    Options:\n\n      -h, --help          output usage information\n      -V, --version       output the version number\n      -a, --absolute      always use absolute URLs for links and images\n      -b, --base <url>    set base URL to resolve relative URLs from\n      -d, --debug         print additional debug information\n      -e, --eval          pass a string from the command line as input\n      -i, --inline        generate inline style links\n      -l, --long-ext      use long extension for Markdown files\n      -o, --output <dir>  set the output directory for converted Markdown\n      -p, --print         print out the converted Markdown\n\n## API\n\n### md(html, [options])\nParses the HTML into a valid [Markdown][] string. The `html` can either be an HTML string or DOM\nelement.\n\n``` javascript\nconsole.log(md('I <strong>love</strong> html.md!')); // \"I **love** html.md!\"\nconsole.log(md(document.querySelector('p')));        // \"Lorem ipsum, *baby*!\"\n```\n\n#### Options\n\nThe following options are recognised by this method (all of which are optional);\n\n<table>\n  <tr>\n    <th>Property</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td>absolute</td>\n    <td>All links and images are parsed with absolute URLs</td>\n  </tr>\n  <tr>\n    <td>base</td>\n    <td>All relative links and images are resolved from this URL</td>\n  </tr>\n  <tr>\n    <td>debug</td>\n    <td>Prepends additional debug information to the Markdown output</td>\n  </tr>\n  <tr>\n    <td>inline</td>\n    <td>All links are generated using the inline style</td>\n  </tr>\n</table>\n\n**Note:** The `base` option *only* works in the [node.js][] environment.\n\n### Miscellaneous\n\n#### `noConflict()`\nReturns `md` in a no-conflict state, reallocating the `md` global variable name to its previous\nowner, where possible.\n\nThis is really just intended for use within a browser.\n\n``` html\n<head>\n  <script src=\"/path/to/conflict-lib.js\"></script>\n  <script src=\"/path/to/md.min.js\"></script>\n  <script>\n    var mdNC = md.noConflict();\n    // Conflicting lib works again and use mdNC for this library onwards...\n  </script>\n</head>\n```\n\n#### `version`\nThe current version of `md`.\n\n``` javascript\nconsole.log(md.version); // \"3.0.2-alpha\"\n```\n\n## Windows\n\n*This section is only relevant for [node.js][] users and does not affect browsers.*\n\nA lot of care has been put in to ensure [html.md][] runs well on Windows. Unfortunately, one of the\ndependencies of the [jsdom][] library, which we depend on to emulate a DOM within the [node.js][]\nenvironment, does not build well on Windows systems since it's built using \"native modules\" that\nare compiled during installation. [Contextify][], the inherited dependency in question, is used to\nrun `<script>` contents safely in a sandbox environment and is required to properly parse DOM\nobjects into valid [Markdown][].\n\nFortunately, the author has documented some techniques to get it building on your Windows system in\na [Windows installation guide][].\n\n## Bugs\n\nIf you have any problems with this library or would like to see the changes currently in\ndevelopment you can do so here;\n\nhttps://github.com/neocotic/html.md/issues\n\n## Questions?\n\nTake a look at `docs/*` to get a better understanding of what the code is doing.\n\nIf that doesn't help, feel free to follow me on Twitter, [@neocotic][].\n\nHowever, if you want more information or examples of using this library please visit the project's\nhomepage;\n\nhttp://neocotic.com/html.md\n\n[@neocotic]: https://twitter.com/neocotic\n[contextify]: https://github.com/brianmcd/contextify\n[html]: http://en.wikipedia.org/wiki/HTML\n[html.md]: http://neocotic.com/html.md\n[jsdom]: https://github.com/tmpvar/jsdom\n[markdown]: http://en.wikipedia.org/wiki/Markdown\n[node.js]: http://nodejs.org\n[windows installation guide]: https://github.com/brianmcd/contextify/wiki/Windows-Installation-Guide\n","scripts":{"test":"grunt test"},"_npmUser":{"name":"neocotic","email":"mercer.alasdair@gmail.com"},"licenses":[{"url":"https://github.com/neocotic/html.md/raw/master/LICENSE.md","type":"MIT"}],"repository":{"url":"git://github.com/neocotic/html.md.git","type":"git"},"_npmVersion":"1.3.5","description":"JavaScript library for converting HTML in to valid Markdown","directories":{},"dependencies":{"jsdom":"~0.8.6","fs-extra":"~0.7.0","commander":"~2.0.0"},"readmeFilename":"README.md","devDependencies":{"grunt":"~0.4.1","grunt-docco":"~0.2.0","grunt-contrib-clean":"~0.5.0","grunt-contrib-coffee":"~0.7.0","grunt-contrib-uglify":"~0.2.4","grunt-contrib-nodeunit":"~0.2.1"}},"3.0.2-beta":{"name":"html-md","version":"3.0.2-beta","keywords":["html","markdown","convert"],"author":{"url":"http://neocotic.com","name":"Alasdair Mercer","email":"mercer.alasdair@gmail.com"},"_id":"html-md@3.0.2-beta","maintainers":[{"name":"neocotic","email":"mercer.alasdair@gmail.com"}],"homepage":"http://neocotic.com/html.md","bugs":{"url":"https://github.com/neocotic/html.md/issues"},"bin":{"htmlmd":"./bin/htmlmd"},"man":["./man/doc.1"],"dist":{"shasum":"4358113b7e31737bf3f9f040175e3247202c0669","tarball":"https://registry.npmjs.org/html-md/-/html-md-3.0.2-beta.tgz","integrity":"sha512-hM3QgnCeE10G49lcJsrnSRZlwHcLliBMwel99heIA2rdjtEr6uD/77pBUN9RP+1muHOxpblSv2+O/aj0ITSM4g==","signatures":[{"sig":"MEUCIQCy4YeUAkePm7/JcSCD+R1G/6+oApUwOcvyWRi0dZdM9gIgdbPjtlP8bcLY04MRNvqGr20e3Z4SiDbDBNZ+eYSMhM0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/md","_from":".","readme":"     __      __               ___                      __     \n    /\\ \\    /\\ \\__           /\\_ \\                    /\\ \\    \n    \\ \\ \\___\\ \\ ,_\\   ___ ___\\//\\ \\        ___ ___    \\_\\ \\   \n     \\ \\  _ `\\ \\ \\/ /' __` __`\\\\ \\ \\     /' __` __`\\  /'_` \\  \n      \\ \\ \\ \\ \\ \\ \\_/\\ \\/\\ \\/\\ \\\\_\\ \\_ __/\\ \\/\\ \\/\\ \\/\\ \\L\\ \\ \n       \\ \\_\\ \\_\\ \\__\\ \\_\\ \\_\\ \\_\\\\____\\\\_\\ \\_\\ \\_\\ \\_\\ \\___,_\\\n        \\/_/\\/_/\\/__/\\/_/\\/_/\\/_//____//_/\\/_/\\/_/\\/_/\\/__,_ /\n\n[html.md][] is a pure JavaScript library for converting [HTML][] in to valid [Markdown][].\n\n[![Build Status](https://secure.travis-ci.org/neocotic/html.md.png)](http://travis-ci.org/neocotic/html.md)\n\n[html.md][] can be used normally in any browser as well as in the [node.js][] environment where it\nalso provides a command line interface.\n\n* [Install](#install)\n* [Examples](#examples)\n* [Usage](#usage)\n* [API](#api)\n   * [md](#mdhtml-options)\n   * [Miscellaneous](#miscellaneous)\n* [Windows](#windows)\n* [Bugs](#bugs)\n* [Questions](#questions)\n\n## Install\n\nInstall using the package manager for your desired environment(s):\n\n``` bash\n# for node.js:\n$ npm install html-md\n# OR; for the browser:\n$ bower install html-md\n```\n\n## Examples\n\nIn the browser:\n\n``` html\n<html>\n  <head>\n    <script src=\"/path/to/md.min.js\"></script>\n    <script>\n      (function () {\n        var body = document.getElementsByTagName('body')[0];\n        console.log(md(body));\n      }());\n    </script>\n  </head>\n  <body>\n    <h1>Hello, World!</h1>\n    <p>My tasks for today:</p>\n    <ul>\n      <li>Learn all about <a href=\"http://neocotic.com/html.md\">html.md</a></li>\n      <li>Tell everyone how <strong>awesome</strong> it is!</li>\n    </ul>\n  </body>\n</html>\n```\n\nIn [node.js][]:\n\n``` javascript\nvar md = require('html-md');\n\nconsole.log(md('I <em>love</em> html.md!'));\n```\n\nThe fantastic [jsdom][] library is used in this environment in order to simulate a working DOM to\nbe traversed and translated to Markdown (see the [Windows](#windows) section for important notes\nabout support for this platform).\n\nIn the terminal:\n\n``` bash\n# provide HTML to be converted and print it back out to stdout:\n$ htmlmd -epi \"I <b>love</b> <a href='http://neocotic.com/html.md'>html.md</a>\"\nI **love** [html.md](http://neocotic.com/html.md)\n# convert HTML files and output them into another directory:\n$ htmlmd -o ./markdown ./html/*.html\n# convert all HTML files in the current directory into Markdown files:\n$ htmlmd -l .\n```\n\n## Usage\n\n    Usage: htmlmd [options] [ -e html | <file ...> ]\n\n    Options:\n\n      -h, --help          output usage information\n      -V, --version       output the version number\n      -a, --absolute      always use absolute URLs for links and images\n      -b, --base <url>    set base URL to resolve relative URLs from\n      -d, --debug         print additional debug information\n      -e, --eval          pass a string from the command line as input\n      -i, --inline        generate inline style links\n      -l, --long-ext      use long extension for Markdown files\n      -o, --output <dir>  set the output directory for converted Markdown\n      -p, --print         print out the converted Markdown\n\n## API\n\n### md(html, [options])\nParses the HTML into a valid [Markdown][] string. The `html` can either be an HTML string or DOM\nelement.\n\n``` javascript\nconsole.log(md('I <strong>love</strong> html.md!')); // \"I **love** html.md!\"\nconsole.log(md(document.querySelector('p')));        // \"Lorem ipsum, *baby*!\"\n```\n\n#### Options\n\nThe following options are recognised by this method (all of which are optional);\n\n<table>\n  <tr>\n    <th>Property</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td>absolute</td>\n    <td>All links and images are parsed with absolute URLs</td>\n  </tr>\n  <tr>\n    <td>base</td>\n    <td>All relative links and images are resolved from this URL</td>\n  </tr>\n  <tr>\n    <td>debug</td>\n    <td>Prepends additional debug information to the Markdown output</td>\n  </tr>\n  <tr>\n    <td>inline</td>\n    <td>All links are generated using the inline style</td>\n  </tr>\n</table>\n\n**Note:** The `base` option *only* works in the [node.js][] environment.\n\n### Miscellaneous\n\n#### `noConflict()`\nReturns `md` in a no-conflict state, reallocating the `md` global variable name to its previous\nowner, where possible.\n\nThis is really just intended for use within a browser.\n\n``` html\n<head>\n  <script src=\"/path/to/conflict-lib.js\"></script>\n  <script src=\"/path/to/md.min.js\"></script>\n  <script>\n    var mdNC = md.noConflict();\n    // Conflicting lib works again and use mdNC for this library onwards...\n  </script>\n</head>\n```\n\n#### `version`\nThe current version of `md`.\n\n``` javascript\nconsole.log(md.version); // \"3.0.2-beta\"\n```\n\n## Windows\n\n*This section is only relevant for [node.js][] users and does not affect browsers.*\n\nA lot of care has been put in to ensure [html.md][] runs well on Windows. Unfortunately, one of the\ndependencies of the [jsdom][] library, which we depend on to emulate a DOM within the [node.js][]\nenvironment, does not build well on Windows systems since it's built using \"native modules\" that\nare compiled during installation. [Contextify][], the inherited dependency in question, is used to\nrun `<script>` contents safely in a sandbox environment and is required to properly parse DOM\nobjects into valid [Markdown][].\n\nFortunately, the author has documented some techniques to get it building on your Windows system in\na [Windows installation guide][].\n\n## Bugs\n\nIf you have any problems with this library or would like to see the changes currently in\ndevelopment you can do so here;\n\nhttps://github.com/neocotic/html.md/issues\n\n## Questions?\n\nTake a look at `docs/*` to get a better understanding of what the code is doing.\n\nIf that doesn't help, feel free to follow me on Twitter, [@neocotic][].\n\nHowever, if you want more information or examples of using this library please visit the project's\nhomepage;\n\nhttp://neocotic.com/html.md\n\n[@neocotic]: https://twitter.com/neocotic\n[contextify]: https://github.com/brianmcd/contextify\n[html]: http://en.wikipedia.org/wiki/HTML\n[html.md]: http://neocotic.com/html.md\n[jsdom]: https://github.com/tmpvar/jsdom\n[markdown]: http://en.wikipedia.org/wiki/Markdown\n[node.js]: http://nodejs.org\n[windows installation guide]: https://github.com/brianmcd/contextify/wiki/Windows-Installation-Guide\n","scripts":{"test":"grunt test"},"_npmUser":{"name":"neocotic","email":"mercer.alasdair@gmail.com"},"licenses":[{"url":"https://github.com/neocotic/html.md/raw/master/LICENSE.md","type":"MIT"}],"repository":{"url":"git://github.com/neocotic/html.md.git","type":"git"},"_npmVersion":"1.3.5","description":"JavaScript library for converting HTML in to valid Markdown","directories":{},"dependencies":{"jsdom":"~0.8.6","fs-extra":"~0.7.0","commander":"~2.0.0"},"readmeFilename":"README.md","devDependencies":{"grunt":"~0.4.1","grunt-docco":"~0.2.0","grunt-contrib-clean":"~0.5.0","grunt-contrib-coffee":"~0.7.0","grunt-contrib-uglify":"~0.2.4","grunt-contrib-nodeunit":"~0.2.1"}},"3.0.2":{"name":"html-md","version":"3.0.2","keywords":["html","markdown","convert"],"author":{"url":"http://neocotic.com","name":"Alasdair Mercer","email":"mercer.alasdair@gmail.com"},"_id":"html-md@3.0.2","maintainers":[{"name":"neocotic","email":"mercer.alasdair@gmail.com"}],"homepage":"http://neocotic.com/html.md","bugs":{"url":"https://github.com/neocotic/html.md/issues"},"bin":{"htmlmd":"./bin/htmlmd"},"man":["./man/doc.1"],"dist":{"shasum":"becac66f3c7d27aa99409d0a17f1131f16fe510f","tarball":"https://registry.npmjs.org/html-md/-/html-md-3.0.2.tgz","integrity":"sha512-bAU30qXQgfRNvyaGAIRrNd1oNIk6S5nmPnEAyAOVtW7usK5RAFU5fmdx2ZlW58Mly27J512wGI4Q5TZaD1wuXQ==","signatures":[{"sig":"MEUCIQC6uYrz5g9fcX/UZ+u8kGeSrvW3R2OBkKDsahV+9wq7yQIgdUgvBMNVOimkE2J8LH8WFYLeeX+tQkw70qKmkPrXcGk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib/md","_from":".","readme":"     __      __               ___                      __     \n    /\\ \\    /\\ \\__           /\\_ \\                    /\\ \\    \n    \\ \\ \\___\\ \\ ,_\\   ___ ___\\//\\ \\        ___ ___    \\_\\ \\   \n     \\ \\  _ `\\ \\ \\/ /' __` __`\\\\ \\ \\     /' __` __`\\  /'_` \\  \n      \\ \\ \\ \\ \\ \\ \\_/\\ \\/\\ \\/\\ \\\\_\\ \\_ __/\\ \\/\\ \\/\\ \\/\\ \\L\\ \\ \n       \\ \\_\\ \\_\\ \\__\\ \\_\\ \\_\\ \\_\\\\____\\\\_\\ \\_\\ \\_\\ \\_\\ \\___,_\\\n        \\/_/\\/_/\\/__/\\/_/\\/_/\\/_//____//_/\\/_/\\/_/\\/_/\\/__,_ /\n\n[html.md][] is a pure JavaScript library for converting [HTML][] in to valid [Markdown][].\n\n[![Build Status](https://secure.travis-ci.org/neocotic/html.md.png)](http://travis-ci.org/neocotic/html.md)\n\n[html.md][] can be used normally in any browser as well as in the [node.js][] environment where it\nalso provides a command line interface.\n\n* [Install](#install)\n* [Examples](#examples)\n* [Usage](#usage)\n* [API](#api)\n   * [md](#mdhtml-options)\n   * [Miscellaneous](#miscellaneous)\n* [Windows](#windows)\n* [Bugs](#bugs)\n* [Questions](#questions)\n\n## Install\n\nInstall using the package manager for your desired environment(s):\n\n``` bash\n# for node.js:\n$ npm install html-md\n# OR; for the browser:\n$ bower install html-md\n```\n\n## Examples\n\nIn the browser:\n\n``` html\n<html>\n  <head>\n    <script src=\"/path/to/md.min.js\"></script>\n    <script>\n      (function () {\n        var body = document.getElementsByTagName('body')[0];\n        console.log(md(body));\n      }());\n    </script>\n  </head>\n  <body>\n    <h1>Hello, World!</h1>\n    <p>My tasks for today:</p>\n    <ul>\n      <li>Learn all about <a href=\"http://neocotic.com/html.md\">html.md</a></li>\n      <li>Tell everyone how <strong>awesome</strong> it is!</li>\n    </ul>\n  </body>\n</html>\n```\n\nIn [node.js][]:\n\n``` javascript\nvar md = require('html-md');\n\nconsole.log(md('I <em>love</em> html.md!'));\n```\n\nThe fantastic [jsdom][] library is used in this environment in order to simulate a working DOM to\nbe traversed and translated to Markdown (see the [Windows](#windows) section for important notes\nabout support for this platform).\n\nIn the terminal:\n\n``` bash\n# provide HTML to be converted and print it back out to stdout:\n$ htmlmd -epi \"I <b>love</b> <a href='http://neocotic.com/html.md'>html.md</a>\"\nI **love** [html.md](http://neocotic.com/html.md)\n# convert HTML files and output them into another directory:\n$ htmlmd -o ./markdown ./html/*.html\n# convert all HTML files in the current directory into Markdown files:\n$ htmlmd -l .\n```\n\n## Usage\n\n    Usage: htmlmd [options] [ -e html | <file ...> ]\n\n    Options:\n\n      -h, --help          output usage information\n      -V, --version       output the version number\n      -a, --absolute      always use absolute URLs for links and images\n      -b, --base <url>    set base URL to resolve relative URLs from\n      -d, --debug         print additional debug information\n      -e, --eval          pass a string from the command line as input\n      -i, --inline        generate inline style links\n      -l, --long-ext      use long extension for Markdown files\n      -o, --output <dir>  set the output directory for converted Markdown\n      -p, --print         print out the converted Markdown\n\n## API\n\n### md(html, [options])\nParses the HTML into a valid [Markdown][] string. The `html` can either be an HTML string or DOM\nelement.\n\n``` javascript\nconsole.log(md('I <strong>love</strong> html.md!')); // \"I **love** html.md!\"\nconsole.log(md(document.querySelector('p')));        // \"Lorem ipsum, *baby*!\"\n```\n\n#### Options\n\nThe following options are recognised by this method (all of which are optional);\n\n<table>\n  <tr>\n    <th>Property</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td>absolute</td>\n    <td>All links and images are parsed with absolute URLs</td>\n  </tr>\n  <tr>\n    <td>base</td>\n    <td>All relative links and images are resolved from this URL</td>\n  </tr>\n  <tr>\n    <td>debug</td>\n    <td>Prepends additional debug information to the Markdown output</td>\n  </tr>\n  <tr>\n    <td>inline</td>\n    <td>All links are generated using the inline style</td>\n  </tr>\n</table>\n\n**Note:** The `base` option *only* works in the [node.js][] environment.\n\n### Miscellaneous\n\n#### `noConflict()`\nReturns `md` in a no-conflict state, reallocating the `md` global variable name to its previous\nowner, where possible.\n\nThis is really just intended for use within a browser.\n\n``` html\n<head>\n  <script src=\"/path/to/conflict-lib.js\"></script>\n  <script src=\"/path/to/md.min.js\"></script>\n  <script>\n    var mdNC = md.noConflict();\n    // Conflicting lib works again and use mdNC for this library onwards...\n  </script>\n</head>\n```\n\n#### `version`\nThe current version of `md`.\n\n``` javascript\nconsole.log(md.version); // \"3.0.2\"\n```\n\n## Windows\n\n*This section is only relevant for [node.js][] users and does not affect browsers.*\n\nA lot of care has been put in to ensure [html.md][] runs well on Windows. Unfortunately, one of the\ndependencies of the [jsdom][] library, which we depend on to emulate a DOM within the [node.js][]\nenvironment, does not build well on Windows systems since it's built using \"native modules\" that\nare compiled during installation. [Contextify][], the inherited dependency in question, is used to\nrun `<script>` contents safely in a sandbox environment and is required to properly parse DOM\nobjects into valid [Markdown][].\n\nFortunately, the author has documented some techniques to get it building on your Windows system in\na [Windows installation guide][].\n\n## Bugs\n\nIf you have any problems with this library or would like to see the changes currently in\ndevelopment you can do so here;\n\nhttps://github.com/neocotic/html.md/issues\n\n## Questions?\n\nTake a look at `docs/*` to get a better understanding of what the code is doing.\n\nIf that doesn't help, feel free to follow me on Twitter, [@neocotic][].\n\nHowever, if you want more information or examples of using this library please visit the project's\nhomepage;\n\nhttp://neocotic.com/html.md\n\n[@neocotic]: https://twitter.com/neocotic\n[contextify]: https://github.com/brianmcd/contextify\n[html]: http://en.wikipedia.org/wiki/HTML\n[html.md]: http://neocotic.com/html.md\n[jsdom]: https://github.com/tmpvar/jsdom\n[markdown]: http://en.wikipedia.org/wiki/Markdown\n[node.js]: http://nodejs.org\n[windows installation guide]: https://github.com/brianmcd/contextify/wiki/Windows-Installation-Guide\n","scripts":{"test":"grunt test"},"_npmUser":{"name":"neocotic","email":"mercer.alasdair@gmail.com"},"licenses":[{"url":"https://github.com/neocotic/html.md/raw/master/LICENSE.md","type":"MIT"}],"deprecated":"Package has been moved to Europa: https://www.npmjs.com/package/europa","repository":{"url":"git://github.com/neocotic/html.md.git","type":"git"},"_npmVersion":"1.3.5","description":"JavaScript library for converting HTML in to valid Markdown","directories":{},"dependencies":{"jsdom":"~0.8.6","fs-extra":"~0.7.0","commander":"~2.0.0"},"readmeFilename":"README.md","devDependencies":{"grunt":"~0.4.1","grunt-docco":"~0.2.0","grunt-contrib-clean":"~0.5.0","grunt-contrib-coffee":"~0.7.0","grunt-contrib-uglify":"~0.2.4","grunt-contrib-nodeunit":"~0.2.1"}}},"time":{"created":"2012-12-11T20:52:47.122Z","modified":"2026-05-10T17:48:28.658Z","2.0.0":"2012-12-11T20:52:49.494Z","2.0.1":"2012-12-12T11:12:00.702Z","2.0.2":"2013-02-04T15:35:40.063Z","2.1.0":"2013-05-03T13:15:06.908Z","2.1.1":"2013-05-06T15:53:45.277Z","3.0.0":"2013-08-15T13:22:06.305Z","3.0.1":"2013-08-16T10:26:55.085Z","3.0.2-alpha":"2013-10-09T09:21:02.299Z","3.0.2-beta":"2013-10-09T09:29:17.496Z","3.0.2":"2013-10-09T09:43:18.472Z"},"bugs":{"url":"https://github.com/neocotic/html.md/issues"},"author":{"url":"http://neocotic.com","name":"Alasdair Mercer","email":"mercer.alasdair@gmail.com"},"homepage":"http://neocotic.com/html.md","keywords":["html","markdown","convert"],"repository":{"url":"git://github.com/neocotic/html.md.git","type":"git"},"description":"JavaScript library for converting HTML in to valid Markdown","maintainers":[{"email":"mercer.alasdair+npm@gmail.com","name":"airmrcr"}],"readme":"     __      __               ___                      __     \n    /\\ \\    /\\ \\__           /\\_ \\                    /\\ \\    \n    \\ \\ \\___\\ \\ ,_\\   ___ ___\\//\\ \\        ___ ___    \\_\\ \\   \n     \\ \\  _ `\\ \\ \\/ /' __` __`\\\\ \\ \\     /' __` __`\\  /'_` \\  \n      \\ \\ \\ \\ \\ \\ \\_/\\ \\/\\ \\/\\ \\\\_\\ \\_ __/\\ \\/\\ \\/\\ \\/\\ \\L\\ \\ \n       \\ \\_\\ \\_\\ \\__\\ \\_\\ \\_\\ \\_\\\\____\\\\_\\ \\_\\ \\_\\ \\_\\ \\___,_\\\n        \\/_/\\/_/\\/__/\\/_/\\/_/\\/_//____//_/\\/_/\\/_/\\/_/\\/__,_ /\n\n[html.md][] is a pure JavaScript library for converting [HTML][] in to valid\n[Markdown][].\n\n[![Build Status](https://secure.travis-ci.org/neocotic/html.md.png)](http://travis-ci.org/neocotic/html.md)\n\n[html.md][] can be used normally in any browser as well as in the [node.js][]\nenvironment where it also provides a command line interface.\n\n## Install\n\nInstall from [npm][]:\n\n``` bash\n$ npm install html-md\n```\n\n## Usage\n\n```\nUsage: md [options] [ -e html | file.html ] [arguments]\n\nOptions:\n  -a, --absolute     always use absolute URLs for links\n  -d, --debug        print additional debug information\n  -e, --eval         pass a string from the command line as input\n  -h, --help         display this help information\n  -l, --long-ext     use long extension for Markdown files\n  -o, --output DIR   set the output directory for converted Markdown\n  -p, --print        print out the converted Markdown\n  -v, --version      display the version number\n```\n\n### Examples\n\nProvide HTML to be converted and print it out into the terminal:\n\n``` bash\n$ md -ep \"I <b>love</b> <a href='https://github.com/neocotic/html.md'>html.md</a>\"\nI **love** [html.md](https://github.com/neocotic/html.md)\n```\n\nConvert HTML files and output them into another directory:\n\n``` bash\n$ md -o ./markdown ./html/*.html\n```\n\nConvert all `.html` files in the current directory into `.markdown` files:\n\n``` bash\n$ md -l .\n```\n\n## Programmatically\n\n`md(html[, options])` is used primarily:\n\n``` html\n<script src=\"dist/md.min.js\"></script>\n<script>\n  var markdown = md(document.querySelector('.content'))\n  console.log(markdown)\n</script>\n```\n\n### Options\n\nThe following options are recognised by this method (all of which are optional);\n\n<table>\n  <tr>\n    <th>Property</th>\n    <th>Description</th>\n  </tr>\n  <tr>\n    <td>absolute</td>\n    <td>All links are parsed with absolute URLs</td>\n  </tr>\n  <tr>\n    <td>debug</td>\n    <td>Prepends additional debug information to the Markdown output</td>\n  </tr>\n</table>\n\n### Miscellaneous\n\n`md.noConflict()` returns `md` in a no-conflict state, reallocating the `md`\nglobal variable name to its previous owner, where possible.\n\n`md.VERSION` returns the current version.\n\n## Bugs\n\nIf you have any problems with this library or would like to see the changes\ncurrently in development you can do so here;\n\nhttps://github.com/neocotic/html.md/issues\n\n## Questions?\n\nTake a look at `docs/md.html` to get a better understanding of what the code is\ndoing.\n\nIf that doesn't help, feel free to follow me on Twitter, [@neocotic][].\n\nHowever, if you want more information or examples of using this library please\nvisit the project's homepage;\n\nhttp://neocotic.com/html.md\n\n[@neocotic]: https://twitter.com/neocotic\n[html]: http://en.wikipedia.org/wiki/HTML\n[html.md]: http://neocotic.com/html.md\n[markdown]: http://en.wikipedia.org/wiki/Markdown\n[node.js]: http://nodejs.org\n[npm]: http://npmjs.org","users":{"tracker1":true,"georgenorris":true,"the.datawhore":true}}