diff --git a/Jake/templates/package.json.tmpl b/Jake/templates/package.json.tmpl index 65860e6d..16f83e03 100644 --- a/Jake/templates/package.json.tmpl +++ b/Jake/templates/package.json.tmpl @@ -22,7 +22,7 @@ "github-flavored-markdown": "git://github.com/hegemonic/github-flavored-markdown.git", "js2xmlparser": "0.1.0", "jshint": "0.9.1", - "markdown": "0.4.0", + "markdown": "git://github.com/jsdoc3/markdown-js.git", "taffydb": "git://github.com/hegemonic/taffydb.git", "underscore": "1.4.2", "wrench": "1.3.9" diff --git a/node_modules/github-flavored-markdown/scripts/showdown.js b/node_modules/github-flavored-markdown/scripts/showdown.js index 4efc3e0f..3ff5b4c9 100644 --- a/node_modules/github-flavored-markdown/scripts/showdown.js +++ b/node_modules/github-flavored-markdown/scripts/showdown.js @@ -151,7 +151,7 @@ this.makeHtml = function(text, gh) { g_html_blocks = new Array(); // benblank - Allow hardwrapping to be disabled. - g_hardwrap = (typeof exports.hardwrap === "undefined" || exports.hardwrap); + g_hardwrap = typeof this.hardwrap === "undefined" || this.hardwrap; // attacklab: Replace ~ with ~T // This lets us use tilde as an escape char to avoid md5 hashes @@ -622,9 +622,9 @@ var writeAnchorTag = function(wholeMatch,m1,m2,m3,m4,m5,m6,m7) { } url = "#"+link_id; - if (g_urls[link_id] != undefined) { + if (Object.prototype.hasOwnProperty.call(g_urls, link_id)) { url = g_urls[link_id]; - if (g_titles[link_id] != undefined) { + if (Object.prototype.hasOwnProperty.call(g_titles, link_id)) { title = g_titles[link_id]; } } @@ -727,9 +727,9 @@ var writeImageTag = function(wholeMatch,m1,m2,m3,m4,m5,m6,m7) { } url = "#"+link_id; - if (g_urls[link_id] != undefined) { + if (Object.prototype.hasOwnProperty.call(g_urls, link_id)) { url = g_urls[link_id]; - if (g_titles[link_id] != undefined) { + if (Object.prototype.hasOwnProperty.call(g_titles, link_id)) { title = g_titles[link_id]; } } diff --git a/node_modules/markdown/README.markdown b/node_modules/markdown/README.markdown index 392f943f..67f39696 100644 --- a/node_modules/markdown/README.markdown +++ b/node_modules/markdown/README.markdown @@ -46,8 +46,29 @@ If you want more control check out the documentation in available (including examples!). One day we'll get the docs generated and hosted somewhere for nicer browsing. -We're yet to try it out in a browser, though it's high up on our list of -things to sort out for this project. +It also works in a browser; here is a complete example: + + + + + +
+ + + + ### md2html diff --git a/node_modules/markdown/lib/markdown.js b/node_modules/markdown/lib/markdown.js index dbf670ee..817cfddc 100644 --- a/node_modules/markdown/lib/markdown.js +++ b/node_modules/markdown/lib/markdown.js @@ -1091,7 +1091,7 @@ Markdown.DialectHelpers.inline_until_char = function( text, want ) { return null; } - res = this.dialect.inline.__oneElement__.call(this, text.substr( consumed ) ); + var res = this.dialect.inline.__oneElement__.call(this, text.substr( consumed ) ); consumed += res[ 0 ]; // Add any returned nodes. nodes.push.apply( nodes, res.slice( 1 ) ); @@ -1512,7 +1512,7 @@ function convert_tree_to_html( tree, references, options ) { jsonml[ 0 ] = "a"; // grab this ref and clean up the attribute node - var ref = references[ attrs.ref ]; + var ref = Object.prototype.hasOwnProperty.call(references, attrs.ref) && references[ attrs.ref ]; // if the reference exists, make the link if ( ref ) { @@ -1536,7 +1536,7 @@ function convert_tree_to_html( tree, references, options ) { jsonml[ 0 ] = "img"; // grab this ref and clean up the attribute node - var ref = references[ attrs.ref ]; + var ref = Object.prototype.hasOwnProperty.call(references, attrs.ref) && references[ attrs.ref ]; // if the reference exists, make the link if ( ref ) { diff --git a/node_modules/markdown/package.json b/node_modules/markdown/package.json index b30c6406..0db4dd0a 100644 --- a/node_modules/markdown/package.json +++ b/node_modules/markdown/package.json @@ -57,7 +57,12 @@ "scripts": { "test": "tap test/*.t.js" }, - "readme": "markdown-js\n===========\n\nYet another markdown parser, this time for JavaScript. There's a few\noptions that precede this project but they all treat markdown to HTML\nconversion as a single step process. You pass markdown in and get HTML\nout, end of story. We had some pretty particular views on how the\nprocess should actually look, which include:\n\n * producing well-formed HTML. This means that em and strong nesting is\n important, as is the ability to output as both HTML and XHTML\n\n * having an intermediate representation to allow processing of parsed\n data (we in fact have two, both [JsonML]: a markdown tree and an\n HTML tree)\n\n * being easily extensible to add new dialects without having to\n rewrite the entire parsing mechanics\n\n * having a good test suite. The only test suites we could find tested\n massive blocks of input, and passing depended on outputting the HTML\n with exactly the same whitespace as the original implementation\n\n[JsonML]: http://jsonml.org/ \"JSON Markup Language\"\n\n## Installation\n\nJust the `markdown` library:\n\n npm install markdown\n\nAlso install `md2html` to `/usr/local/bin` (or wherever)\n\n npm install -g markdown\n\n## Usage\n\nThe simple way to use it with CommonJS is:\n\n var input = \"# Heading\\n\\nParagraph\";\n var output = require( \"markdown\" ).markdown.toHTML( input );\n print( output );\n\nIf you want more control check out the documentation in\n[lib/markdown.js] which details all the methods and parameters\navailable (including examples!). One day we'll get the docs generated\nand hosted somewhere for nicer browsing.\n\nWe're yet to try it out in a browser, though it's high up on our list of\nthings to sort out for this project.\n\n### md2html\n\n md2html /path/to/doc.md > /path/to/doc.html\n\n[lib/markdown.js]: http://github.com/evilstreak/markdown-js/blob/master/lib/markdown.js\n\n## Intermediate Representation\n\nInternally the process to convert a chunk of markdown into a chunk of\nHTML has three steps:\n\n 1. Parse the markdown into a JsonML tree. Any references found in the\n parsing are stored in the attribute hash of the root node under the\n key `references`.\n\n 2. Convert the markdown tree into an HTML tree. Rename any nodes that\n need it (`bulletlist` to `ul` for example) and lookup any references\n used by links or images. Remove the references attribute once done.\n\n 3. Stringify the HTML tree being careful not to wreck whitespace where\n whitespace is important (surrounding inline elements for example).\n\nEach step of this process can be called individually if you need to do\nsome processing or modification of the data at an intermediate stage.\nFor example, you may want to grab a list of all URLs linked to in the\ndocument before rendering it to HTML which you could do by recursing\nthrough the HTML tree looking for `a` nodes.\n\n## Running tests\n\nTo run the tests under node you will need tap installed (it's listed as a\ndevDependencies so `npm install` from the checkout should be enough), then do\n\n $ ./node_modules/.bin/tap test/*.t.js\n\n## Contributing\n\nDo the usual github fork and pull request dance. Add yourself to the\ncontributors section of package.json too if you want to.\n\n## License\n\nReleased under the MIT license.\n", + "readme": "markdown-js\n===========\n\nYet another markdown parser, this time for JavaScript. There's a few\noptions that precede this project but they all treat markdown to HTML\nconversion as a single step process. You pass markdown in and get HTML\nout, end of story. We had some pretty particular views on how the\nprocess should actually look, which include:\n\n * producing well-formed HTML. This means that em and strong nesting is\n important, as is the ability to output as both HTML and XHTML\n\n * having an intermediate representation to allow processing of parsed\n data (we in fact have two, both [JsonML]: a markdown tree and an\n HTML tree)\n\n * being easily extensible to add new dialects without having to\n rewrite the entire parsing mechanics\n\n * having a good test suite. The only test suites we could find tested\n massive blocks of input, and passing depended on outputting the HTML\n with exactly the same whitespace as the original implementation\n\n[JsonML]: http://jsonml.org/ \"JSON Markup Language\"\n\n## Installation\n\nJust the `markdown` library:\n\n npm install markdown\n\nAlso install `md2html` to `/usr/local/bin` (or wherever)\n\n npm install -g markdown\n\n## Usage\n\nThe simple way to use it with CommonJS is:\n\n var input = \"# Heading\\n\\nParagraph\";\n var output = require( \"markdown\" ).markdown.toHTML( input );\n print( output );\n\nIf you want more control check out the documentation in\n[lib/markdown.js] which details all the methods and parameters\navailable (including examples!). One day we'll get the docs generated\nand hosted somewhere for nicer browsing.\n\nIt also works in a browser; here is a complete example:\n\n \n \n \n \n
\n \n \n \n \n\n### md2html\n\n md2html /path/to/doc.md > /path/to/doc.html\n\n[lib/markdown.js]: http://github.com/evilstreak/markdown-js/blob/master/lib/markdown.js\n\n## Intermediate Representation\n\nInternally the process to convert a chunk of markdown into a chunk of\nHTML has three steps:\n\n 1. Parse the markdown into a JsonML tree. Any references found in the\n parsing are stored in the attribute hash of the root node under the\n key `references`.\n\n 2. Convert the markdown tree into an HTML tree. Rename any nodes that\n need it (`bulletlist` to `ul` for example) and lookup any references\n used by links or images. Remove the references attribute once done.\n\n 3. Stringify the HTML tree being careful not to wreck whitespace where\n whitespace is important (surrounding inline elements for example).\n\nEach step of this process can be called individually if you need to do\nsome processing or modification of the data at an intermediate stage.\nFor example, you may want to grab a list of all URLs linked to in the\ndocument before rendering it to HTML which you could do by recursing\nthrough the HTML tree looking for `a` nodes.\n\n## Running tests\n\nTo run the tests under node you will need tap installed (it's listed as a\ndevDependencies so `npm install` from the checkout should be enough), then do\n\n $ ./node_modules/.bin/tap test/*.t.js\n\n## Contributing\n\nDo the usual github fork and pull request dance. Add yourself to the\ncontributors section of package.json too if you want to.\n\n## License\n\nReleased under the MIT license.\n", + "readmeFilename": "README.markdown", "_id": "markdown@0.4.0", - "_from": "markdown" + "dist": { + "shasum": "6a5d7cb751c1d1e6adc374d40e9d358474b59a8e" + }, + "_resolved": "git://github.com/jsdoc3/markdown-js.git#fd27f4c979f3f71e82e1fe76ffe6415980b31f00", + "_from": "git://github.com/jsdoc3/markdown-js.git" } diff --git a/package.json b/package.json index 86ed008b..7c89057c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jsdoc", "version": "3.1.0-dev", - "revision": "1358915320017", + "revision": "1358959687142", "description": "An API documentation generator for JavaScript.", "keywords": [ "documentation", "javascript" ], "licenses": [ @@ -22,7 +22,7 @@ "github-flavored-markdown": "git://github.com/hegemonic/github-flavored-markdown.git", "js2xmlparser": "0.1.0", "jshint": "0.9.1", - "markdown": "0.4.0", + "markdown": "git://github.com/jsdoc3/markdown-js.git", "taffydb": "git://github.com/hegemonic/taffydb.git", "underscore": "1.4.2", "wrench": "1.3.9"