markdown
Version:
A sensible Markdown parser for javascript
53 lines (52 loc) • 1.29 kB
JSON
["html", ["p", "Just a ", ["a", {
"href": "/url/"
},
"URL"], "."],
["p", ["a", {
"href": "/url/",
"title": "title"
},
"URL and title"], "."],
["p", ["a", {
"href": "/url/",
"title": "title preceded by two spaces"
},
"URL and title"], "."],
["p", ["a", {
"href": "/url/",
"title": "title preceded by a tab"
},
"URL and title"], "."],
["p", ["a", {
"href": "/url/",
"title": "title has spaces afterward"
},
"URL and title"], "."],
["p", ["a", {
"href": "/url/"
},
"URL wrapped in angle brackets"], "."],
["p", ["a", {
"href": "/url/",
"title": "Here's the title"
},
"URL w/ angle brackets + title"], "."],
["p", ["a", "Empty"], "."],
["p", ["a", {
"href": "http://en.wikipedia.org/wiki/WIMP_(computing)"
},
"With parens in the URL"]],
["p", "(With outer parens and ", ["a", {
"href": "/foo(bar)"
},
"parens in url"], ")"],
["p", ["a", {
"href": "/foo(bar)",
"title": "and a title"
},
"With parens in the URL"]],
["p", "(With outer parens and ", ["a", {
"href": "/foo(bar)",
"title": "and a title"
},
"parens in url"], ")"]]