{"_id":"node-markdown","_rev":"241670","name":"node-markdown","description":"Parse Markdown syntax with node.js","dist-tags":{"latest":"0.1.1"},"maintainers":[{"name":"andris","email":"andris@kreata.ee"}],"time":{"modified":"2021-06-03T15:57:46.000Z","created":"2012-07-22T18:20:54.253Z","0.1.1":"2012-07-22T18:20:54.253Z","0.1.0":"2012-07-22T18:20:54.253Z"},"users":{"fgribreau":true,"cvanhasselt":true,"xiongwilee":true,"zhangyaochun":true},"author":{"name":"Andris Reinman"},"repository":{"type":"git","url":"git://github.com/andris9/node-markdown.git"},"versions":{"0.1.1":{"name":"node-markdown","description":"Parse Markdown syntax with node.js","version":"0.1.1","author":{"name":"Andris Reinman"},"maintainers":[{"name":"andris","email":"andris@kreata.ee"}],"repository":{"type":"git","url":"git://github.com/andris9/node-markdown.git"},"directories":{"lib":"./lib"},"main":"./lib/markdown","licenses":[{"type":"BSD","url":"http://github.com/andris9/node-markdown/blob/master/LICENSE"}],"_npmUser":{"name":"andris","email":"andris@node.ee"},"_id":"node-markdown@0.1.1","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.17","_defaultsLoaded":true,"dist":{"shasum":"e365baba38d4ac56d8563dd69ca6d7215b08fb94","size":65026,"noattachment":false,"key":"/node-markdown/-/node-markdown-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-markdown/download/node-markdown-0.1.1.tgz"},"deprecated":"highlight is deprecated in favor of \"highliht.js\"","publish_time":1342981254253,"_hasShrinkwrap":false,"_cnpm_publish_time":1342981254253},"0.1.0":{"name":"node-markdown","description":"Parse Markdown syntax with node.js","version":"0.1.0","author":{"name":"Andris Reinman"},"maintainers":[{"name":"andris","email":"andris@kreata.ee"}],"repository":{"type":"git","url":"http://github.com/andris9/node-markdown.git"},"directories":{"lib":"./lib"},"main":"./lib/markdown","licenses":[{"type":"BSD","url":"http://github.com/andris9/node-markdown/blob/master/LICENSE"}],"_id":"node-markdown@0.1.0","engines":{"node":"*"},"_nodeSupported":true,"_npmVersion":"0.2.7-2","_nodeVersion":"v0.3.1-pre","dist":{"shasum":"4440e7e7a2f5598070638095f67cf476e5bcbedd","size":64143,"noattachment":false,"key":"/node-markdown/-/node-markdown-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/node-markdown/download/node-markdown-0.1.0.tgz"},"deprecated":"highlight is deprecated in favor of \"highliht.js\"","publish_time":1342981254253,"_hasShrinkwrap":false,"_cnpm_publish_time":1342981254253}},"readme":"node-markdown\n=============\n\n**node-markdown** is based on [Showdown](http://attacklab.net/showdown/) parser and is meant to parse [Markdown](http://daringfireball.net/projects/markdown/) syntax into HTML code.\n\nInstallation\n------------\n\nUse `npm` package manager\n\n    npm install node-markdown\n\nUsage\n-----\n\nInclude Markdown parser\n\n    var md = require(\"node-markdown\").Markdown;\n\nParse Markdown syntax into HTML\n\n    var html = md(\"**markdown** string\");\n\nAllow only [default set](http://github.com/andris9/node-markdown/blob/master/lib/markdown.js#L38) of HTML tags to be used\n\n    var html = md(\"**markdown** string\", true);\n\nAllow only specified HTML tags to be used (default set of allowed attributes is used)\n\n    var html = md(\"**markdown** string\", true, \"p|strong|span\");\n\nAllow specified HTML tags and specified attributes\n\n    var html = md(\"**markdown** string\", true, \"p|strong|span\", {\n        \"a\":\"href\",        // 'href' for links\n        \"*\":\"title|style\"  // 'title' and 'style' for all\n    });\n\nComplete example\n\n    var md_text = \"**bold** *italic* [link](http://www.neti.ee) `code block`\",\n        md_parser = require(\"node-markdown\").Markdown;\n\n    // simple\n    console.log(md_parser(md_text));\n    \n    // limit HTML tags and attributes\n    console.log(md_parser(md_text, true, 'h1|p|span'));\n    \n    // limit HTML tags and keep attributes for allowed tags\n    var allowedTags = 'a|img';\n        allowedAttributes = {\n            'a':'href|style',\n            'img': 'src',\n            '*': 'title'\n        }\n    console.log(md_parser(md_text, true, allowedTags, allowedAttributes));\n","_attachments":{}}