forked from zhoutony/html5
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
52 lines (52 loc) · 2.93 KB
/
package.json
File metadata and controls
52 lines (52 loc) · 2.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
"name": "node-markdown",
"description": "Parse Markdown syntax with node.js",
"version": "0.1.1",
"author": {
"name": "Andris Reinman"
},
"maintainers": [
{
"name": "andris",
"email": "andris@node.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",
"tarball": "http://registry.npmjs.org/node-markdown/-/node-markdown-0.1.1.tgz"
},
"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",
"deprecated": "highlight is deprecated in favor of \"highliht.js\"",
"_shasum": "e365baba38d4ac56d8563dd69ca6d7215b08fb94",
"_resolved": "https://registry.npmjs.org/node-markdown/-/node-markdown-0.1.1.tgz",
"_from": "node-markdown@>=0.1.1 <0.2.0"
}