1node-markdown
2=============
3
4node-markdown is based on [Showdown parser](http://attacklab.net/showdown/) and meant to parse [Markdown](http://daringfireball.net/projects/markdown/) syntax into HTML code.
5
6Usage
7-----
8
9 var md_text = "**bold** *italic* [link](http://www.neti.ee) `code block`",
10 md_parser = require("../lib/markdown.js").Markdown;
11
12 // simple
13 console.log(md_parser(md_text));
14
15 // limit HTML tags and attributes
16 console.log(md_parser(md_text, true, 'h1|p|span'));
17
18 // limit HTML tags and keep attributes for allowed tags
19 var allowedTags = 'a|img';
20 allowedAttributes = {
21 'a':'href|style',
22 'img': 'src',
23 '*': 'title'
24 }
25 console.log(md_parser(md_text, true, allowedTags, allowedAttributes));