├── .gitignore ├── LICENSE ├── README.md ├── app.js ├── bin └── nd ├── config └── config.json ├── deps └── marked │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── bin │ └── marked │ ├── index.js │ ├── lib │ ├── marked.js │ └── terminal.js │ ├── man │ └── marked.1 │ ├── package.json │ └── test │ ├── README │ ├── browser │ ├── index.html │ ├── index.js │ └── test.js │ ├── fix │ ├── fix.js │ ├── index.js │ ├── new │ ├── blockquote_list_item.html │ ├── blockquote_list_item.text │ ├── case_insensitive_refs.html │ ├── case_insensitive_refs.text │ ├── escaped_angles.html │ ├── escaped_angles.text │ ├── gfm_break.html │ ├── gfm_break.text │ ├── gfm_code.html │ ├── gfm_code.text │ ├── gfm_em.html │ ├── gfm_em.text │ ├── gfm_links.html │ ├── gfm_links.text │ ├── hr_list_break.html │ ├── hr_list_break.text │ ├── lazy_blockquotes.html │ ├── lazy_blockquotes.text │ ├── list_item_text.html │ ├── list_item_text.text │ ├── loose_lists.html │ ├── loose_lists.text │ ├── main.html │ ├── main.text │ ├── nested_code.html │ ├── nested_code.text │ ├── nested_em.html │ ├── nested_em.text │ ├── nested_square_link.html │ ├── nested_square_link.text │ ├── not_a_link.html │ ├── not_a_link.text │ ├── ref_paren.html │ ├── ref_paren.text │ ├── same_bullet.html │ ├── same_bullet.text │ ├── toplevel_paragraphs.html │ ├── toplevel_paragraphs.text │ ├── tricky_list.html │ └── tricky_list.text │ ├── original │ ├── amps_and_angles_encoding.html │ ├── amps_and_angles_encoding.text │ ├── auto_links.html │ ├── auto_links.text │ ├── backslash_escapes.html │ ├── backslash_escapes.text │ ├── blockquotes_with_code_blocks.html │ ├── blockquotes_with_code_blocks.text │ ├── code_blocks.html │ ├── code_blocks.text │ ├── code_spans.html │ ├── code_spans.text │ ├── hard_wrapped_paragraphs_with_list_like_lines.html │ ├── hard_wrapped_paragraphs_with_list_like_lines.text │ ├── horizontal_rules.html │ ├── horizontal_rules.text │ ├── inline_html_advanced.html │ ├── inline_html_advanced.text │ ├── inline_html_comments.html │ ├── inline_html_comments.text │ ├── inline_html_simple.html │ ├── inline_html_simple.text │ ├── links_inline_style.html │ ├── links_inline_style.text │ ├── links_reference_style.html │ ├── links_reference_style.text │ ├── links_shortcut_references.html │ ├── links_shortcut_references.text │ ├── literal_quotes_in_titles.html │ ├── literal_quotes_in_titles.text │ ├── markdown_documentation_basics.html │ ├── markdown_documentation_basics.text │ ├── markdown_documentation_syntax.html │ ├── markdown_documentation_syntax.text │ ├── nested_blockquotes.html │ ├── nested_blockquotes.text │ ├── ordered_and_unordered_lists.html │ ├── ordered_and_unordered_lists.text │ ├── strong_and_em_together.html │ ├── strong_and_em_together.text │ ├── tabs.html │ ├── tabs.text │ ├── tidyness.html │ └── tidyness.text │ └── tests │ ├── amps_and_angles_encoding.html │ ├── amps_and_angles_encoding.text │ ├── auto_links.html │ ├── auto_links.text │ ├── backslash_escapes.html │ ├── backslash_escapes.text │ ├── blockquote_list_item.html │ ├── blockquote_list_item.text │ ├── blockquotes_with_code_blocks.html │ ├── blockquotes_with_code_blocks.text │ ├── case_insensitive_refs.html │ ├── case_insensitive_refs.text │ ├── code_blocks.html │ ├── code_blocks.text │ ├── code_spans.html │ ├── code_spans.text │ ├── escaped_angles.html │ ├── escaped_angles.text │ ├── gfm_break.html │ ├── gfm_break.text │ ├── gfm_code.html │ ├── gfm_code.text │ ├── gfm_em.html │ ├── gfm_em.text │ ├── gfm_links.html │ ├── gfm_links.text │ ├── hard_wrapped_paragraphs_with_list_like_lines.html │ ├── hard_wrapped_paragraphs_with_list_like_lines.text │ ├── horizontal_rules.html │ ├── horizontal_rules.text │ ├── hr_list_break.html │ ├── hr_list_break.text │ ├── inline_html_advanced.html │ ├── inline_html_advanced.text │ ├── inline_html_comments.html │ ├── inline_html_comments.text │ ├── inline_html_simple.html │ ├── inline_html_simple.text │ ├── lazy_blockquotes.html │ ├── lazy_blockquotes.text │ ├── links_inline_style.html │ ├── links_inline_style.text │ ├── links_reference_style.html │ ├── links_reference_style.text │ ├── links_shortcut_references.html │ ├── links_shortcut_references.text │ ├── list_item_text.html │ ├── list_item_text.text │ ├── literal_quotes_in_titles.html │ ├── literal_quotes_in_titles.text │ ├── loose_lists.html │ ├── loose_lists.text │ ├── main.html │ ├── main.text │ ├── markdown_documentation_basics.html │ ├── markdown_documentation_basics.text │ ├── markdown_documentation_syntax.html │ ├── markdown_documentation_syntax.text │ ├── nested_blockquotes.html │ ├── nested_blockquotes.text │ ├── nested_code.html │ ├── nested_code.text │ ├── nested_em.html │ ├── nested_em.text │ ├── nested_square_link.html │ ├── nested_square_link.text │ ├── not_a_link.html │ ├── not_a_link.text │ ├── ordered_and_unordered_lists.html │ ├── ordered_and_unordered_lists.text │ ├── ref_paren.html │ ├── ref_paren.text │ ├── same_bullet.html │ ├── same_bullet.text │ ├── strong_and_em_together.html │ ├── strong_and_em_together.text │ ├── tabs.html │ ├── tabs.text │ ├── tidyness.html │ ├── tidyness.text │ ├── toplevel_paragraphs.html │ ├── toplevel_paragraphs.text │ ├── tricky_list.html │ └── tricky_list.text ├── lib └── find.js ├── package.json ├── shot.png └── windows-shot.png /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Russell Frank github.com/russfrank russfrank.us twitter.com/russjf 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # nd 2 | 3 | _a documentation viewer for npm_ 4 | 5 | 6 | 7 | `nd` is a documentation viewer for npm packages. Similar to 8 | [mad(1)](http://tjholowaychuk.com/post/21100445420/going-mad-1), 9 | it displays markdown documents in your terminal. Dissimilarly to *mad*, nd 10 | is written in javascript, and reads documentation out of npm module directories, 11 | not out of its own repository of pages. 12 | 13 | By writing this software in javascript, we benefit 14 | from the existing `require()` circuitry. This means that there is a large 15 | volume of useful documentation available, despite the fact that very few packages 16 | have a `doc` or `docs` folder. Nearly every package at least has a 17 | `README.md`; `nd` will read this. 18 | 19 | If a `doc` or `docs` directory is present, or if there is a docs directory 20 | specified in the `package.json` of some module, documentation will be loaded 21 | out of these directories. 22 | 23 | For example, if we type 24 | 25 | ``` 26 | $ nd npm cli 27 | ``` 28 | 29 | We will get `npm/doc/cli/index.md`. So, if additional arguments (besides the 30 | module name) are provided, we try to find a file which is more specific: 31 | we'll look for `module/arg1/arg2/index.md`, `module/arg1/arg2/arg2.md`, and 32 | `module/arg1/arg2.md`. This allows us to be flexible about the organization 33 | of documentation within modules. 34 | 35 | ## Usage 36 | 37 | To install: 38 | 39 | ``` 40 | $ sudo npm install -g nd 41 | ``` 42 | 43 | Note that you may not need `sudo` if you installed `node` via a virtual 44 | environment manager such as [nvm](https://github.com/creationix/nvm). 45 | 46 | To use: 47 | 48 | ``` 49 | $ nd modulename 50 | ``` 51 | 52 | `nd` searches for modules from within the current directory. If it can't find 53 | the module you're looking for in the current directory, it will search for 54 | modules installed globally with `npm -g`. 55 | 56 | 57 | You can also type simply 58 | 59 | ``` 60 | $ nd 61 | ``` 62 | 63 | to get a list of modules in the current directory.. You can run `nd` with the relative 64 | path to a markdown file as an argument and `nd` will read it, or you can pipe it some stuff: 65 | 66 | ``` 67 | $ nd README.md 68 | $ curl https://github.com/russfrank/nd/raw/master/README.md | nd 69 | ``` 70 | 71 | `nd` can also grab core docs, though, I should note that it always takes them 72 | straight out of *master*, which might not be what you want: 73 | 74 | ``` 75 | $ nd node child_process 76 | ``` 77 | 78 | You can also just straight up give it urls, it'll figure that shit out. 79 | 80 | ``` 81 | $ nd https://raw.github.com/joyent/node/master/doc/api/child_process.markdown 82 | ``` 83 | 84 | Also, it works on Windows, since everybody knows that Windows users love to 85 | read docs in their terminal: 86 | 87 | 88 | 89 | ## Future 90 | 91 | More ideas: 92 | 93 | 1. Pydoc like web server 94 | 2. Docco view of source files (markdown comments on left, source on right) in terminal 95 | 3. picture-tube for images 96 | 4. command line completion 97 | 98 | ## License 99 | 100 | MIT. 101 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | var flatiron = require('flatiron'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var _ = require('underscore'); 5 | var app = flatiron.app; 6 | var find = require('./lib/find'); 7 | var async = require('async'); 8 | var npm = require('npm'); 9 | var request = require('request'); 10 | var moar; 11 | 12 | if (fs.existsSync) path.existsSync = fs.existsSync; 13 | if (fs.exists) path.exists = fs.exists; 14 | 15 | app.config.file({ file: path.join(__dirname, 'config', 'config.json') }); 16 | 17 | app.use(flatiron.plugins.cli, {dir: __dirname, usage: [], argv: { 18 | l: {boolean: true} 19 | }}); 20 | 21 | function list (module, args) { 22 | async.waterfall([ 23 | function (callback) { find.root(module, callback); }, 24 | function (root, callback) { find.docDir(root, callback); } 25 | ], function (err, data) { 26 | if (err) { 27 | app.log.error(err); 28 | return; 29 | } 30 | 31 | var dir = path.join(data[0], path.join.apply(null, args)); 32 | 33 | fs.readdir(dir, function (err, files) { 34 | if (err) return app.log.error(err.message); 35 | 36 | if (_.size(files) === 0) { 37 | return app.log.error('No packages found!'); 38 | } 39 | 40 | _.each(files, function (file) { 41 | console.log(file); 42 | }); 43 | }); 44 | }); 45 | } 46 | 47 | function markdisp (data) { 48 | var marked = require('./deps/marked').setOptions({gfm: true, terminal: true}); 49 | if (!moar) { 50 | moar = require('moar')({nowrap: true}); 51 | } 52 | 53 | moar.write('\n' + marked.parse(data)); 54 | moar.end(); 55 | moar.on('done', function () { process.exit(0); }); 56 | } 57 | 58 | function listModules () { 59 | console.log("Available modules:".bold); 60 | npm.dir = process.cwd(); 61 | npm.config.set('global', false); 62 | npm.commands.ls([], false, function (err, data) { 63 | if (err) return app.log.error(err); 64 | }); 65 | } 66 | 67 | function view (module, args) { 68 | async.waterfall([ 69 | function (callback) { find.root(module, callback); }, 70 | function (root, callback) { find.docDir(root, callback); }, 71 | function (dirs, callback) { find.file(dirs, args, module, callback); } 72 | ], function (err, data) { 73 | if (err) { 74 | app.log.error(err); 75 | return; 76 | } 77 | 78 | markdisp(data); 79 | }); 80 | } 81 | 82 | app.cmd('node *', function (page) { 83 | var url = 'https://raw.github.com/joyent/node/master/doc/api/'+page+'.markdown'; 84 | request(url, function (error, res, body) { 85 | if (error || res.statusCode == 404) return app.log.error('error retrieving page'); 86 | markdisp(body); 87 | }); 88 | }); 89 | 90 | app.router.notfound = function () { 91 | var args = app.argv._; 92 | var module = args.shift(); 93 | 94 | if (app.argv.l) { 95 | // list mode 96 | if (args.length > 0 || module) { 97 | list(module, args); 98 | } else { 99 | listModules(); 100 | } 101 | } else { 102 | // view 103 | 104 | if (!process.stdin.isTTY && process.platform !== "win32") { 105 | // we're getting piped some stuff, gather it up and send it over to 106 | // markdisp to be displayed 107 | 108 | // we have spawn less before resuming stdin, or it gets confused 109 | moar = require('moar')({nowrap: true}); 110 | 111 | process.stdin.resume(); 112 | process.stdin.setEncoding('utf8'); 113 | var data = ''; 114 | 115 | process.stdin.on('data', function (chunk) { 116 | data += chunk; 117 | }); 118 | 119 | process.stdin.on('end', function () { 120 | markdisp(data); 121 | }); 122 | } 123 | 124 | // the process.stdin.pauses below are because the call to 125 | // process.stdin.isTTY above are enough to make the process hang without 126 | // pausing stdin 127 | 128 | else if (!module) { 129 | process.stdin.pause(); 130 | // no module name provided, just give a list of modules 131 | listModules(); 132 | } 133 | 134 | else if (/^https?:\/\//.test(module)) { 135 | process.stdin.pause(); 136 | request(module, function (error, res, body) { 137 | if (error || res.statusCode == 404) return app.log.error('error retrieving page'); 138 | markdisp(body); 139 | }); 140 | } 141 | 142 | else { 143 | process.stdin.pause(); 144 | // we have some arguments.. check to see if they're a filename 145 | var file = path.join(process.cwd(), module); 146 | path.exists(file, function (exists) { 147 | 148 | if (exists) { 149 | // if so, read and display the file 150 | fs.readFile(file, 'utf8', function (err, data) { 151 | if (err) return app.log.error(err); 152 | markdisp(data); 153 | }); 154 | } 155 | 156 | else { 157 | // otherwise send the arguments over to view() to do an actual 158 | // module lookup 159 | view(module, args); 160 | } 161 | }); 162 | } 163 | } 164 | }; 165 | 166 | npm.load({global: true, loglevel: 'silent'}, function(err) { 167 | if (err) app.log.error(err); 168 | else app.start(); 169 | }); 170 | -------------------------------------------------------------------------------- /bin/nd: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | require('../app.js'); 4 | -------------------------------------------------------------------------------- /config/config.json: -------------------------------------------------------------------------------- 1 | { 2 | } 3 | -------------------------------------------------------------------------------- /deps/marked/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2012, Christopher Jeffrey (https://github.com/chjj/) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /deps/marked/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | @cp lib/marked.js marked.js 3 | @uglifyjs -o marked.min.js marked.js 4 | 5 | clean: 6 | @rm marked.js 7 | @rm marked.min.js 8 | 9 | .PHONY: clean all 10 | -------------------------------------------------------------------------------- /deps/marked/README.md: -------------------------------------------------------------------------------- 1 | # marked 2 | 3 | A full-featured markdown parser and compiler, written in javascript. 4 | Built for speed. 5 | 6 | ## Benchmarks 7 | 8 | node v0.4.x 9 | 10 | ``` bash 11 | $ node test --bench 12 | marked completed in 12071ms. 13 | showdown (reuse converter) completed in 27387ms. 14 | showdown (new converter) completed in 75617ms. 15 | markdown-js completed in 70069ms. 16 | ``` 17 | 18 | node v0.6.x 19 | 20 | ``` bash 21 | $ node test --bench 22 | marked completed in 6448ms. 23 | marked (gfm) completed in 7357ms. 24 | marked (pedantic) completed in 6092ms. 25 | discount completed in 7314ms. 26 | showdown (reuse converter) completed in 16018ms. 27 | showdown (new converter) completed in 18234ms. 28 | markdown-js completed in 24270ms. 29 | ``` 30 | 31 | __Marked is now faster than Discount, which is written in C.__ 32 | 33 | For those feeling skeptical: These benchmarks run the entire markdown test suite 34 | 1000 times. The test suite tests every feature. It doesn't cater to specific 35 | aspects. 36 | 37 | ## Install 38 | 39 | ``` bash 40 | $ npm install marked 41 | ``` 42 | 43 | ## Another Javascript Markdown Parser 44 | 45 | The point of marked was to create a markdown compiler where it was possible to 46 | frequently parse huge chunks of markdown without having to worry about 47 | caching the compiled output somehow...or blocking for an unnecesarily long time. 48 | 49 | marked is very concise and still implements all markdown features. It is also 50 | now fully compatible with the client-side. 51 | 52 | marked more or less passes the official markdown test suite in its 53 | entirety. This is important because a surprising number of markdown compilers 54 | cannot pass more than a few tests. It was very difficult to get marked as 55 | compliant as it is. It could have cut corners in several areas for the sake 56 | of performance, but did not in order to be exactly what you expect in terms 57 | of a markdown rendering. In fact, this is why marked could be considered at a 58 | disadvantage in the benchmarks above. 59 | 60 | Along with implementing every markdown feature, marked also implements 61 | [GFM features](http://github.github.com/github-flavored-markdown/). 62 | 63 | ## Options 64 | 65 | marked has 4 different switches which change behavior. 66 | 67 | - __pedantic__: Conform to obscure parts of `markdown.pl` as much as possible. 68 | Don't fix any of the original markdown bugs or poor behavior. 69 | - __gfm__: Enable github flavored markdown (enabled by default). 70 | - __sanitize__: Sanitize the output. Ignore any HTML that has been input. 71 | - __highlight__: A callback to highlight code blocks. 72 | 73 | None of the above are mutually exclusive/inclusive. 74 | 75 | ## Usage 76 | 77 | ``` js 78 | // Set default options 79 | marked.setOptions({ 80 | gfm: true, 81 | pedantic: false, 82 | sanitize: true, 83 | // callback for code highlighter 84 | highlight: function(code, lang) { 85 | if (lang === 'js') { 86 | return javascriptHighlighter(code); 87 | } 88 | return code; 89 | } 90 | }); 91 | console.log(marked('i am using __markdown__.')); 92 | ``` 93 | 94 | You also have direct access to the lexer and parser if you so desire. 95 | 96 | ``` js 97 | var tokens = marked.lexer(text); 98 | console.log(marked.parser(tokens)); 99 | ``` 100 | 101 | ``` bash 102 | $ node 103 | > require('marked').lexer('> i am using marked.') 104 | [ { type: 'blockquote_start' }, 105 | { type: 'paragraph', 106 | text: 'i am using marked.' }, 107 | { type: 'blockquote_end' }, 108 | links: {} ] 109 | ``` 110 | 111 | ## CLI 112 | 113 | ``` bash 114 | $ marked -o hello.html 115 | hello world 116 | ^D 117 | $ cat hello.html 118 |

hello world

119 | ``` 120 | 121 | ## License 122 | 123 | Copyright (c) 2011-2012, Christopher Jeffrey. (MIT License) 124 | 125 | See LICENSE for more info. 126 | -------------------------------------------------------------------------------- /deps/marked/bin/marked: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * Marked CLI 5 | * Copyright (c) 2011-2012, Christopher Jeffrey (MIT License) 6 | */ 7 | 8 | var fs = require('fs') 9 | , util = require('util') 10 | , marked = require('../'); 11 | 12 | /** 13 | * Man Page 14 | */ 15 | 16 | var help = function() { 17 | var spawn = require('child_process').spawn; 18 | 19 | var options = { 20 | cwd: process.cwd(), 21 | env: process.env, 22 | setsid: false, 23 | customFds: [0, 1, 2] 24 | }; 25 | 26 | spawn('man', 27 | [__dirname + '/../man/marked.1'], 28 | options); 29 | }; 30 | 31 | /** 32 | * Main 33 | */ 34 | 35 | var main = function(argv) { 36 | var files = [] 37 | , options = {} 38 | , data = '' 39 | , input 40 | , output 41 | , arg 42 | , tokens; 43 | 44 | var getarg = function() { 45 | var arg = argv.shift(); 46 | arg = arg.split('='); 47 | if (arg.length > 1) { 48 | argv.unshift(arg.slice(1).join('=')); 49 | } 50 | return arg[0]; 51 | }; 52 | 53 | while (argv.length) { 54 | arg = getarg(); 55 | switch (arg) { 56 | case '-o': 57 | case '--output': 58 | output = argv.shift(); 59 | break; 60 | case '-i': 61 | case '--input': 62 | input = argv.shift(); 63 | break; 64 | case '-t': 65 | case '--tokens': 66 | tokens = true; 67 | break; 68 | case '--gfm': 69 | options.gfm = true; 70 | break; 71 | case '--sanitize': 72 | options.sanitize = true; 73 | break; 74 | case '--pedantic': 75 | options.pedantic = true; 76 | break; 77 | case '-h': 78 | case '--help': 79 | return help(); 80 | case '--terminal': 81 | options.terminal = true; 82 | break; 83 | default: 84 | files.push(arg); 85 | break; 86 | } 87 | } 88 | 89 | if (!input) { 90 | if (files.length <= 2) { 91 | var stdin = process.stdin; 92 | 93 | stdin.setEncoding('utf8'); 94 | stdin.resume(); 95 | 96 | stdin.on('data', function(text) { 97 | data += text; 98 | }); 99 | 100 | stdin.on('end', write); 101 | 102 | return; 103 | } 104 | input = files.pop(); 105 | } 106 | 107 | data = fs.readFileSync(input, 'utf8'); 108 | write(); 109 | 110 | function write() { 111 | marked.setOptions(options); 112 | 113 | data = tokens 114 | ? JSON.stringify(marked.lexer(data), null, 2) 115 | : marked(data); 116 | 117 | if (!output) { 118 | process.stdout.write(data + '\n'); 119 | } else { 120 | fs.writeFileSync(output, data); 121 | } 122 | } 123 | }; 124 | 125 | if (!module.parent) { 126 | process.title = 'marked'; 127 | main(process.argv.slice()); 128 | } else { 129 | module.exports = main; 130 | } 131 | -------------------------------------------------------------------------------- /deps/marked/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/marked'); 2 | -------------------------------------------------------------------------------- /deps/marked/lib/marked.js: -------------------------------------------------------------------------------- 1 | /** 2 | * marked - A markdown parser (https://github.com/chjj/marked) 3 | * Copyright (c) 2011-2012, Christopher Jeffrey. (MIT Licensed) 4 | */ 5 | 6 | ;(function() { 7 | 8 | /** 9 | * Block-Level Grammar 10 | */ 11 | 12 | var block = { 13 | newline: /^\n+/, 14 | code: /^( {4}[^\n]+\n*)+/, 15 | fences: noop, 16 | hr: /^( *[-*_]){3,} *(?:\n+|$)/, 17 | heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/, 18 | lheading: /^([^\n]+)\n *(=|-){3,} *\n*/, 19 | blockquote: /^( *>[^\n]+(\n[^\n]+)*\n*)+/, 20 | list: /^( *)(bull) [^\0]+?(?:hr|\n{2,}(?! )(?!\1bull )\n*|\s*$)/, 21 | html: /^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/, 22 | def: /^ *\[([^\]]+)\]: *([^\s]+)(?: +["(]([^\n]+)[")])? *(?:\n+|$)/, 23 | paragraph: /^([^\n]+\n?(?!body))+\n*/, 24 | text: /^[^\n]+/ 25 | }; 26 | 27 | block.bullet = /(?:[*+-]|\d+\.)/; 28 | block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/; 29 | block.item = replace(block.item, 'gm') 30 | (/bull/g, block.bullet) 31 | (); 32 | 33 | block.list = replace(block.list) 34 | (/bull/g, block.bullet) 35 | ('hr', /\n+(?=(?: *[-*_]){3,} *(?:\n+|$))/) 36 | (); 37 | 38 | block.html = replace(block.html) 39 | ('comment', //) 40 | ('closed', /<(tag)[^\0]+?<\/\1>/) 41 | ('closing', /])*?>/) 42 | (/tag/g, tag()) 43 | (); 44 | 45 | block.paragraph = (function() { 46 | var paragraph = block.paragraph.source 47 | , body = []; 48 | 49 | (function push(rule) { 50 | rule = block[rule] ? block[rule].source : rule; 51 | body.push(rule.replace(/(^|[^\[])\^/g, '$1')); 52 | return push; 53 | }) 54 | ('hr') 55 | ('heading') 56 | ('lheading') 57 | ('blockquote') 58 | ('<' + tag()) 59 | ('def'); 60 | 61 | return new 62 | RegExp(paragraph.replace('body', body.join('|'))); 63 | })(); 64 | 65 | block.normal = { 66 | fences: block.fences, 67 | paragraph: block.paragraph 68 | }; 69 | 70 | block.gfm = { 71 | fences: /^ *````? *(\w+)? *\n([^\0]+?)\s*````? *(?:\n+|$)/, 72 | paragraph: /^/ 73 | }; 74 | 75 | block.gfm.paragraph = replace(block.paragraph) 76 | ('(?!', '(?!' + block.gfm.fences.source.replace(/(^|[^\[])\^/g, '$1') + '|') 77 | (); 78 | 79 | /** 80 | * Block Lexer 81 | */ 82 | 83 | block.lexer = function(src) { 84 | var tokens = []; 85 | 86 | tokens.links = {}; 87 | 88 | src = src 89 | .replace(/\r\n|\r/g, '\n') 90 | .replace(/\t/g, ' '); 91 | 92 | return block.token(src, tokens, true); 93 | }; 94 | 95 | block.token = function(src, tokens, top) { 96 | var src = src.replace(/^ +$/gm, '') 97 | , next 98 | , loose 99 | , cap 100 | , item 101 | , space 102 | , i 103 | , l; 104 | 105 | while (src) { 106 | // newline 107 | if (cap = block.newline.exec(src)) { 108 | src = src.substring(cap[0].length); 109 | if (cap[0].length > 1) { 110 | tokens.push({ 111 | type: 'space' 112 | }); 113 | } 114 | } 115 | 116 | // code 117 | if (cap = block.code.exec(src)) { 118 | src = src.substring(cap[0].length); 119 | cap = cap[0].replace(/^ {4}/gm, ''); 120 | tokens.push({ 121 | type: 'code', 122 | text: !options.pedantic 123 | ? cap.replace(/\n+$/, '') 124 | : cap 125 | }); 126 | continue; 127 | } 128 | 129 | // fences (gfm) 130 | if (cap = block.fences.exec(src)) { 131 | src = src.substring(cap[0].length); 132 | tokens.push({ 133 | type: 'code', 134 | lang: cap[1], 135 | text: cap[2] 136 | }); 137 | continue; 138 | } 139 | 140 | // heading 141 | if (cap = block.heading.exec(src)) { 142 | src = src.substring(cap[0].length); 143 | tokens.push({ 144 | type: 'heading', 145 | depth: cap[1].length, 146 | text: cap[2] 147 | }); 148 | continue; 149 | } 150 | 151 | // lheading 152 | if (cap = block.lheading.exec(src)) { 153 | src = src.substring(cap[0].length); 154 | tokens.push({ 155 | type: 'heading', 156 | depth: cap[2] === '=' ? 1 : 2, 157 | text: cap[1] 158 | }); 159 | continue; 160 | } 161 | 162 | // hr 163 | if (cap = block.hr.exec(src)) { 164 | src = src.substring(cap[0].length); 165 | tokens.push({ 166 | type: 'hr' 167 | }); 168 | continue; 169 | } 170 | 171 | // blockquote 172 | if (cap = block.blockquote.exec(src)) { 173 | src = src.substring(cap[0].length); 174 | 175 | tokens.push({ 176 | type: 'blockquote_start' 177 | }); 178 | 179 | cap = cap[0].replace(/^ *> ?/gm, ''); 180 | 181 | // Pass `top` to keep the current 182 | // "toplevel" state. This is exactly 183 | // how markdown.pl works. 184 | block.token(cap, tokens, top); 185 | 186 | tokens.push({ 187 | type: 'blockquote_end' 188 | }); 189 | 190 | continue; 191 | } 192 | 193 | // list 194 | if (cap = block.list.exec(src)) { 195 | src = src.substring(cap[0].length); 196 | 197 | tokens.push({ 198 | type: 'list_start', 199 | ordered: isFinite(cap[2]) 200 | }); 201 | 202 | // Get each top-level item. 203 | cap = cap[0].match(block.item); 204 | 205 | next = false; 206 | l = cap.length; 207 | i = 0; 208 | 209 | for (; i < l; i++) { 210 | item = cap[i]; 211 | 212 | // Remove the list item's bullet 213 | // so it is seen as the next token. 214 | space = item.length; 215 | item = item.replace(/^ *([*+-]|\d+\.) +/, ''); 216 | 217 | // Outdent whatever the 218 | // list item contains. Hacky. 219 | if (~item.indexOf('\n ')) { 220 | space -= item.length; 221 | item = !options.pedantic 222 | ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') 223 | : item.replace(/^ {1,4}/gm, ''); 224 | } 225 | 226 | // Determine whether item is loose or not. 227 | // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/ 228 | // for discount behavior. 229 | loose = next || /\n\n(?!\s*$)/.test(item); 230 | if (i !== l - 1) { 231 | next = item[item.length-1] === '\n'; 232 | if (!loose) loose = next; 233 | } 234 | 235 | tokens.push({ 236 | type: loose 237 | ? 'loose_item_start' 238 | : 'list_item_start' 239 | }); 240 | 241 | // Recurse. 242 | block.token(item, tokens); 243 | 244 | tokens.push({ 245 | type: 'list_item_end' 246 | }); 247 | } 248 | 249 | tokens.push({ 250 | type: 'list_end' 251 | }); 252 | 253 | continue; 254 | } 255 | 256 | // html 257 | if (cap = block.html.exec(src)) { 258 | src = src.substring(cap[0].length); 259 | tokens.push({ 260 | type: 'html', 261 | pre: cap[1] === 'pre', 262 | text: cap[0] 263 | }); 264 | continue; 265 | } 266 | 267 | // def 268 | if (top && (cap = block.def.exec(src))) { 269 | src = src.substring(cap[0].length); 270 | tokens.links[cap[1].toLowerCase()] = { 271 | href: cap[2], 272 | title: cap[3] 273 | }; 274 | continue; 275 | } 276 | 277 | // top-level paragraph 278 | if (top && (cap = block.paragraph.exec(src))) { 279 | src = src.substring(cap[0].length); 280 | tokens.push({ 281 | type: 'paragraph', 282 | text: cap[0] 283 | }); 284 | continue; 285 | } 286 | 287 | // text 288 | if (cap = block.text.exec(src)) { 289 | // Top-level should never reach here. 290 | src = src.substring(cap[0].length); 291 | tokens.push({ 292 | type: 'text', 293 | text: cap[0] 294 | }); 295 | continue; 296 | } 297 | } 298 | 299 | return tokens; 300 | }; 301 | 302 | /** 303 | * Inline Processing 304 | */ 305 | 306 | var inline = { 307 | escape: /^\\([\\`*{}\[\]()#+\-.!_>])/, 308 | autolink: /^<([^ >]+(@|:\/)[^ >]+)>/, 309 | url: noop, 310 | tag: /^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/, 311 | link: /^!?\[(inside)\]\(href\)/, 312 | reflink: /^!?\[(inside)\]\s*\[([^\]]*)\]/, 313 | nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/, 314 | strong: /^__([^\0]+?)__(?!_)|^\*\*([^\0]+?)\*\*(?!\*)/, 315 | em: /^\b_((?:__|[^\0])+?)_\b|^\*((?:\*\*|[^\0])+?)\*(?!\*)/, 316 | code: /^(`+)([^\0]*?[^`])\1(?!`)/, 317 | br: /^ {2,}\n(?!\s*$)/, 318 | text: /^[^\0]+?(?=[\\?(?:\s+['"]([^\0]*?)['"])?\s*/; 323 | 324 | inline.link = replace(inline.link) 325 | ('inside', inline._linkInside) 326 | ('href', inline._linkHref) 327 | (); 328 | 329 | inline.reflink = replace(inline.reflink) 330 | ('inside', inline._linkInside) 331 | (); 332 | 333 | inline.normal = { 334 | url: inline.url, 335 | strong: inline.strong, 336 | em: inline.em, 337 | text: inline.text 338 | }; 339 | 340 | inline.pedantic = { 341 | strong: /^__(?=\S)([^\0]*?\S)__(?!_)|^\*\*(?=\S)([^\0]*?\S)\*\*(?!\*)/, 342 | em: /^_(?=\S)([^\0]*?\S)_(?!_)|^\*(?=\S)([^\0]*?\S)\*(?!\*)/ 343 | }; 344 | 345 | inline.gfm = { 346 | url: /^(https?:\/\/[^\s]+[^.,:;"')\]\s])/, 347 | text: /^[^\0]+?(?=[\\' 368 | + text 369 | + ''; 370 | }, 371 | 372 | tag: function (text) { 373 | return options.sanitize 374 | ? escape(text) 375 | : text; 376 | }, 377 | 378 | link: function(isImage, href, title, text) { 379 | if (!isImage) { 380 | return '' 389 | + text 390 | + ''; 391 | } else { 392 | return ''
395 |         + escape(text)
396 |         + ''; 403 | } 404 | }, 405 | 406 | strong: function (text) { 407 | return '' 408 | + text 409 | + ''; 410 | }, 411 | 412 | em: function (text) { 413 | return '' 414 | + text 415 | + ''; 416 | }, 417 | 418 | code: function (text) { 419 | return '' 420 | + escape(text, true) 421 | + ''; 422 | }, 423 | 424 | br: function () { 425 | return '
'; 426 | }, 427 | 428 | text: function (text) { 429 | return escape(text); 430 | } 431 | }; 432 | 433 | inline.lexer = function(src) { 434 | var out = '' 435 | , links = tokens.links 436 | , link 437 | , text 438 | , href 439 | , cap; 440 | 441 | while (src) { 442 | // escape 443 | if (cap = inline.escape.exec(src)) { 444 | src = src.substring(cap[0].length); 445 | out += inline.fmt.escape(cap[1]); 446 | continue; 447 | } 448 | 449 | // autolink 450 | if (cap = inline.autolink.exec(src)) { 451 | var email; 452 | src = src.substring(cap[0].length); 453 | if (cap[2] === '@') { 454 | email = true; 455 | text = cap[1][6] === ':' 456 | ? (cap[1].substring(7)) 457 | : (cap[1]); 458 | href = ('mailto:') + text; 459 | } else { 460 | email = false; 461 | text = cap[1]; 462 | href = text; 463 | } 464 | out += inline.fmt.autolink(href, text, false); 465 | continue; 466 | } 467 | 468 | // url (gfm) 469 | if (cap = inline.url.exec(src)) { 470 | src = src.substring(cap[0].length); 471 | text = cap[1]; 472 | href = text; 473 | out += inline.fmt.url(href, text); 474 | continue; 475 | } 476 | 477 | // tag 478 | if (cap = inline.tag.exec(src)) { 479 | src = src.substring(cap[0].length); 480 | out += inline.fmt.tag(cap[0]); 481 | continue; 482 | } 483 | 484 | // link 485 | if (cap = inline.link.exec(src)) { 486 | src = src.substring(cap[0].length); 487 | 488 | var isImage = cap[0][0] === '!'? true : false; 489 | if (!isImage) cap[1] = inline.lexer(cap[1]); 490 | 491 | out += inline.fmt.link(isImage, cap[2], cap[1], cap[3]); 492 | continue; 493 | } 494 | 495 | // reflink, nolink 496 | if ((cap = inline.reflink.exec(src)) 497 | || (cap = inline.nolink.exec(src))) { 498 | src = src.substring(cap[0].length); 499 | link = (cap[2] || cap[1]).replace(/\s+/g, ' '); 500 | link = links[link.toLowerCase()]; 501 | if (!link || !link.href) { 502 | out += cap[0][0]; 503 | src = cap[0].substring(1) + src; 504 | continue; 505 | } 506 | out += inline.fmt.link(false, link.href, link.title, inline.lexer(cap[1])); 507 | continue; 508 | } 509 | 510 | // strong 511 | if (cap = inline.strong.exec(src)) { 512 | src = src.substring(cap[0].length); 513 | out += inline.fmt.strong(inline.lexer(cap[2] || cap[1])); 514 | continue; 515 | } 516 | 517 | // em 518 | if (cap = inline.em.exec(src)) { 519 | src = src.substring(cap[0].length); 520 | out += inline.fmt.em(inline.lexer(cap[2] || cap[1])); 521 | continue; 522 | } 523 | 524 | // code 525 | if (cap = inline.code.exec(src)) { 526 | src = src.substring(cap[0].length); 527 | out += inline.fmt.code(cap[2]); 528 | continue; 529 | } 530 | 531 | // br 532 | if (cap = inline.br.exec(src)) { 533 | src = src.substring(cap[0].length); 534 | out += inline.fmt.br(); 535 | continue; 536 | } 537 | 538 | // text 539 | if (cap = inline.text.exec(src)) { 540 | src = src.substring(cap[0].length); 541 | out += inline.fmt.text(cap[0]); 542 | continue; 543 | } 544 | } 545 | 546 | return out; 547 | }; 548 | 549 | /** 550 | * Parsing 551 | */ 552 | 553 | var tokens 554 | , token 555 | , fmt 556 | , defaultFmt; 557 | 558 | defaultFmt = { 559 | hr: function () { return '
\n'; }, 560 | 561 | heading: function (depth, text) { 562 | return '' 565 | + text 566 | + '\n'; 569 | }, 570 | 571 | code: function (lang, text, escaped) { 572 | if (!escaped) text = escape(text); 573 | 574 | return '
'
581 |       + text
582 |       + '
\n'; 583 | }, 584 | 585 | blockquote: function (body) { 586 | return '
\n' 587 | + body 588 | + '
\n'; 589 | }, 590 | 591 | list: function (type, body) { 592 | return '<' 593 | + type 594 | + '>\n' 595 | + body 596 | + '\n'; 599 | }, 600 | 601 | listItem: function (body) { 602 | return '
  • ' 603 | + body 604 | + '
  • \n'; 605 | }, 606 | 607 | paragraph: function (body) { 608 | return '

    ' 609 | + body 610 | + '

    \n'; 611 | } 612 | }; 613 | 614 | function next() { 615 | return token = tokens.pop(); 616 | } 617 | 618 | function tok() { 619 | switch (token.type) { 620 | case 'space': { 621 | return ''; 622 | } 623 | case 'hr': { 624 | return fmt.hr(); 625 | } 626 | case 'heading': { 627 | return fmt.heading(token.depth, inline.lexer(token.text)); 628 | } 629 | 630 | case 'code': { 631 | if (options.highlight) { 632 | token.code = options.highlight(token.text, token.lang); 633 | if (token.code != null && token.code !== token.text) { 634 | token.escaped = true; 635 | token.text = token.code; 636 | } 637 | } 638 | 639 | return fmt.code(token.lang, token.text, token.escaped); 640 | } 641 | 642 | case 'blockquote_start': { 643 | var body = ''; 644 | 645 | while (next().type !== 'blockquote_end') { 646 | body += tok(); 647 | } 648 | 649 | return fmt.blockquote(body); 650 | } 651 | 652 | case 'list_start': { 653 | var type = token.ordered ? 'ol' : 'ul' 654 | , body = ''; 655 | 656 | while (next().type !== 'list_end') { 657 | body += tok(); 658 | } 659 | 660 | return fmt.list(type, body); 661 | } 662 | 663 | case 'list_item_start': { 664 | var body = ''; 665 | 666 | while (next().type !== 'list_item_end') { 667 | body += token.type === 'text' 668 | ? parseText() 669 | : tok(); 670 | } 671 | 672 | return fmt.listItem(body); 673 | } 674 | 675 | case 'loose_item_start': { 676 | var body = ''; 677 | 678 | while (next().type !== 'list_item_end') { 679 | body += tok(); 680 | } 681 | 682 | return fmt.listItem(body); 683 | } 684 | 685 | case 'html': { 686 | if (options.sanitize) { 687 | return inline.lexer(token.text); 688 | } 689 | return !token.pre && !options.pedantic 690 | ? inline.lexer(token.text) 691 | : token.text; 692 | } 693 | 694 | case 'paragraph': { 695 | return fmt.paragraph(inline.lexer(token.text)); 696 | } 697 | 698 | case 'text': { 699 | return fmt.paragraph(parseText()); 700 | } 701 | } 702 | } 703 | 704 | function parseText() { 705 | var body = token.text 706 | , top; 707 | 708 | while ((top = tokens[tokens.length-1]) 709 | && top.type === 'text') { 710 | body += '\n' + next().text; 711 | } 712 | 713 | return inline.lexer(body); 714 | } 715 | 716 | function parse(src) { 717 | tokens = src.reverse(); 718 | 719 | var out = ''; 720 | while (next()) { 721 | out += tok(); 722 | } 723 | 724 | tokens = null; 725 | token = null; 726 | 727 | return out; 728 | } 729 | 730 | /** 731 | * Helpers 732 | */ 733 | 734 | function escape(html, encode) { 735 | return html 736 | .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&') 737 | .replace(//g, '>') 739 | .replace(/"/g, '"') 740 | .replace(/'/g, '''); 741 | } 742 | 743 | function mangle(text) { 744 | var out = '' 745 | , l = text.length 746 | , i = 0 747 | , ch; 748 | 749 | for (; i < l; i++) { 750 | ch = text.charCodeAt(i); 751 | if (Math.random() > 0.5) { 752 | ch = 'x' + ch.toString(16); 753 | } 754 | out += '&#' + ch + ';'; 755 | } 756 | 757 | return out; 758 | } 759 | 760 | function tag() { 761 | var tag = '(?!(?:' 762 | + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code' 763 | + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo' 764 | + '|span|br|wbr|ins|del|img)\\b)\\w+'; 765 | 766 | return tag; 767 | } 768 | 769 | function replace(regex, opt) { 770 | regex = regex.source; 771 | opt = opt || ''; 772 | return function self(name, val) { 773 | if (!name) return new RegExp(regex, opt); 774 | regex = regex.replace(name, val.source || val); 775 | return self; 776 | }; 777 | } 778 | 779 | function noop() {} 780 | noop.exec = noop; 781 | 782 | /** 783 | * Marked 784 | */ 785 | 786 | function marked(src, opt) { 787 | setOptions(opt); 788 | return parse(block.lexer(src)); 789 | } 790 | 791 | /** 792 | * Options 793 | */ 794 | 795 | var options 796 | , defaults; 797 | 798 | function setOptions(opt) { 799 | if (!opt) opt = defaults; 800 | if (options === opt) return; 801 | options = opt; 802 | 803 | if (options.gfm) { 804 | block.fences = block.gfm.fences; 805 | block.paragraph = block.gfm.paragraph; 806 | inline.text = inline.gfm.text; 807 | inline.url = inline.gfm.url; 808 | } else { 809 | block.fences = block.normal.fences; 810 | block.paragraph = block.normal.paragraph; 811 | inline.text = inline.normal.text; 812 | inline.url = inline.normal.url; 813 | } 814 | 815 | if (options.pedantic) { 816 | inline.em = inline.pedantic.em; 817 | inline.strong = inline.pedantic.strong; 818 | } else { 819 | inline.em = inline.normal.em; 820 | inline.strong = inline.normal.strong; 821 | } 822 | 823 | if (options.fmt) { 824 | fmt = options.fmt; 825 | } else { 826 | fmt = defaultFmt; 827 | } 828 | 829 | if (options.inlineFmt) { 830 | inline.fmt = options.inlineFmt; 831 | } else { 832 | inline.fmt = inline.defaultFmt; 833 | } 834 | 835 | if (options.terminal) { 836 | var term = require('./terminal'); 837 | inline.fmt = term.inlineFmt; 838 | fmt = term.fmt; 839 | } else { 840 | fmt = defaultFmt; 841 | inline.fmt = inline.defaultFmt; 842 | } 843 | } 844 | 845 | marked.options = 846 | marked.setOptions = function(opt) { 847 | defaults = opt; 848 | setOptions(opt); 849 | return marked; 850 | }; 851 | 852 | marked.setOptions({ 853 | gfm: true, 854 | pedantic: false, 855 | sanitize: false, 856 | highlight: null 857 | }); 858 | 859 | /** 860 | * Expose 861 | */ 862 | 863 | marked.parser = function(src, opt) { 864 | setOptions(opt); 865 | return parse(src); 866 | }; 867 | 868 | marked.lexer = function(src, opt) { 869 | setOptions(opt); 870 | return block.lexer(src); 871 | }; 872 | 873 | marked.parse = marked; 874 | 875 | if (typeof module !== 'undefined') { 876 | module.exports = marked; 877 | } else { 878 | this.marked = marked; 879 | } 880 | 881 | }).call(function() { 882 | return this || (typeof window !== 'undefined' ? window : global); 883 | }()); 884 | -------------------------------------------------------------------------------- /deps/marked/lib/terminal.js: -------------------------------------------------------------------------------- 1 | try { 2 | var colors = require('colors'); 3 | var wordwrap = require('wordwrap'); 4 | } catch (e) { 5 | console.error([ 6 | "terminal support in marked requires npm packages `colors` and `wordwrap`.", 7 | "it isn't in the package.json as a dependency because nobody really cares", 8 | "about markdown in the terminal apparently. Install them with", 9 | "`npm install colors wordwrap`." 10 | ].join('\n')); 11 | } 12 | 13 | var width = process.stdout.getWindowSize && process.stdout.getWindowSize()[0]; 14 | if (!width) width = 90; 15 | width = Math.floor(0.85 * width); 16 | var wrap = wordwrap(3, width); 17 | var indent = wordwrap(9, width); 18 | var paragraph = wordwrap(6, width); 19 | 20 | var _s = require('underscore.string'); 21 | 22 | exports.inlineFmt = { 23 | escape: function (text) { 24 | return text; 25 | }, 26 | 27 | autolink: function (href, text) { 28 | if (href.indexOf && href.indexOf('mailto') !== -1) { 29 | href = href.slice(7); 30 | } 31 | if (href == text || href[0] == '#') { 32 | return text.underline; 33 | } else { 34 | return text.underline + ' (' + href + ')'; 35 | } 36 | }, 37 | 38 | tag: function (text) { 39 | //return text; 40 | return ''; 41 | }, 42 | 43 | link: function (isImage, href, title, text) { 44 | return exports.inlineFmt.autolink(href, text || title); 45 | }, 46 | 47 | url: function (href, text) { 48 | return exports.inlineFmt.autolink(href, text); 49 | }, 50 | 51 | strong: function (text) { 52 | return text.bold; 53 | }, 54 | 55 | em: function (text) { 56 | return text.bold.underline; 57 | }, 58 | 59 | code: function (text) { 60 | return text.grey; 61 | }, 62 | 63 | br: function () { 64 | return '\n'; 65 | }, 66 | 67 | text: function (text) { 68 | return text; 69 | } 70 | }; 71 | 72 | function fixWhitespace (body) { 73 | body = body 74 | .replace(/\n/g, ' ') 75 | .replace(/[\s]+/g, ' '); 76 | body = _s.trim(body); 77 | return body; 78 | } 79 | 80 | function colorizeLines (body, c) { 81 | return body.split('\n').map(function (item) { return item[c]; }).join('\n'); 82 | } 83 | 84 | exports.fmt = { 85 | hr: function () { 86 | var line = (function () { 87 | return ' ' + new Array(width - 2).join(process.platform == "win32" ? "-":"⎽"); 88 | }()); 89 | return line + '\n\n'; 90 | }, 91 | 92 | heading: function (depth, text) { 93 | text = fixWhitespace(text); 94 | switch (depth) { 95 | case 1: return wrap(text.bold.blue.underline) + '\n\n'; 96 | case 2: return wrap(text.bold.underline) + '\n\n'; 97 | default: return wrap(text.bold) + '\n\n'; 98 | } 99 | }, 100 | 101 | code: function (lang, text) { 102 | // we do have to colorize twice here because after indenting some new lines 103 | // may have been made so we'll have to colorize those lines as well 104 | text = indent(colorizeLines(text, 'grey')); 105 | return colorizeLines(text, 'grey') + '\n\n'; 106 | }, 107 | 108 | blockquote: function (body) { 109 | body = fixWhitespace(body); 110 | return indent(body).grey + '\n\n'; 111 | }, 112 | 113 | list: function (type, body) { 114 | return body + '\n\n'; 115 | }, 116 | 117 | listItem: function (body) { 118 | body = fixWhitespace(body); 119 | return indent(body.replace(/\n/g, ' ')).replace(' ', ' * ') + '\n'; 120 | }, 121 | 122 | paragraph: function (body) { 123 | body = body 124 | .replace(/\n/g, ' ') 125 | .replace(/[\s]+/g, ' '); 126 | 127 | body = _s.trim(body); 128 | return paragraph(body.replace(/\n/g, ' ').replace(/[\s]+/g, ' ')) + '\n\n'; 129 | } 130 | }; 131 | -------------------------------------------------------------------------------- /deps/marked/man/marked.1: -------------------------------------------------------------------------------- 1 | .ds q \N'34' 2 | .TH marked 1 3 | .SH NAME 4 | marked \- a javascript markdown parser 5 | .SH SYNOPSIS 6 | .nf 7 | .B marked [\-o output] [\-i input] [\-th] 8 | .fi 9 | .SH DESCRIPTION 10 | .B marked 11 | is a full-featured javascript markdown parser, built for speed. It also includes 12 | multiple GFM features. 13 | .SH OPTIONS 14 | .TP 15 | .BI \-o,\ \-\-output\ [output] 16 | Specify file output. If none is specified, write to stdout. 17 | .TP 18 | .BI \-i,\ \-\-input\ [input] 19 | Specify file input, otherwise use last argument as input file. If no input file 20 | is specified, read from stdin. 21 | .TP 22 | .BI \-t,\ \-\-tokens 23 | Output a token stream instead of html. 24 | .TP 25 | .BI \-\-pedantic 26 | Conform to obscure parts of markdown.pl as much as possible. Don't fix original 27 | markdown bugs. 28 | .TP 29 | .BI \-\-gfm 30 | Enable github flavored markdown. 31 | .TP 32 | .BI \-\-sanitize 33 | Sanitize output. Ignore any HTML input. 34 | .TP 35 | .BI \-h,\ \-\-help 36 | Display help information. 37 | .SH EXAMPLES 38 | .TP 39 | cat in.md | marked > out.html 40 | .TP 41 | echo "hello *world*" | marked 42 | .TP 43 | marked -o out.html in.md 44 | .TP 45 | marked --output="hello world.html" -i in.md 46 | .SH BUGS 47 | Please report any bugs to https://github.com/chjj/marked. 48 | .SH LICENSE 49 | Copyright (c) 2011-2012, Christopher Jeffrey (MIT License) 50 | -------------------------------------------------------------------------------- /deps/marked/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "marked", 3 | "description": "A markdown parser built for speed", 4 | "author": "Christopher Jeffrey", 5 | "version": "0.2.5", 6 | "main": "./lib/marked.js", 7 | "bin": "./bin/marked", 8 | "man": "./man/marked.1", 9 | "preferGlobal": false, 10 | "repository": "git://github.com/chjj/marked.git", 11 | "homepage": "https://github.com/chjj/marked", 12 | "bugs": { "url": "http://github.com/chjj/marked/issues" }, 13 | "keywords": [ "markdown", "markup", "html" ], 14 | "tags": [ "markdown", "markup", "html" ] 15 | } 16 | -------------------------------------------------------------------------------- /deps/marked/test/README: -------------------------------------------------------------------------------- 1 | In this directory: 2 | 3 | # 4 | # MarkdownTester -- Run tests for Markdown implementations 5 | # 6 | # Copyright (c) 2004-2005 John Gruber 7 | # 8 | # 9 | 10 | Partially modified for testing purposes. 11 | -------------------------------------------------------------------------------- /deps/marked/test/browser/index.html: -------------------------------------------------------------------------------- 1 | 2 | marked tests 3 |

    testing...

    4 | 5 | 6 | -------------------------------------------------------------------------------- /deps/marked/test/browser/index.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | 3 | var main = require('../') 4 | , load = main.load; 5 | 6 | var express = require('express') 7 | , app = express.createServer(); 8 | 9 | app.use(function(req, res, next) { 10 | var setHeader = res.setHeader; 11 | res.setHeader = function(name) { 12 | switch (name) { 13 | case 'Cache-Control': 14 | case 'Last-Modified': 15 | case 'ETag': 16 | return; 17 | } 18 | return setHeader.apply(res, arguments); 19 | }; 20 | next(); 21 | }); 22 | 23 | var dir = __dirname + '/../tests' 24 | , files = {}; 25 | 26 | app.get('/test.js', function(req, res, next) { 27 | var test = fs.readFileSync(__dirname + '/test.js', 'utf8') 28 | , files = load(); 29 | 30 | test = test.replace('__TESTS__', JSON.stringify(files)); 31 | test = test.replace('__MAIN__', main + ''); 32 | 33 | res.contentType('.js'); 34 | res.send(test); 35 | }); 36 | 37 | app.use(express.static(__dirname + '/../../lib')); 38 | app.use(express.static(__dirname)); 39 | 40 | app.listen(8080); 41 | -------------------------------------------------------------------------------- /deps/marked/test/browser/test.js: -------------------------------------------------------------------------------- 1 | ;(function() { 2 | 3 | var files = __TESTS__; 4 | 5 | var BREAK_ON_ERROR = false; 6 | 7 | var print = function(text) { 8 | var args = Array.prototype.slice.call(arguments, 1) 9 | , i = 0; 10 | 11 | text = text.replace(/%\w/g, function() { 12 | return args[i++] || ''; 13 | }); 14 | 15 | if (window.console) window.console.log(text); 16 | document.body.innerHTML += '
    ' + escape(text) + '
    '; 17 | }; 18 | 19 | var console = { log: print }; 20 | 21 | var load = function() {}; 22 | 23 | Object.keys = Object.keys || function(obj) { 24 | var out = [] 25 | , key; 26 | 27 | for (key in obj) { 28 | if (Object.prototype.hasOwnProperty.call(obj, key)) { 29 | out.push(key); 30 | } 31 | } 32 | 33 | return out; 34 | }; 35 | 36 | String.prototype.trim = String.prototype.trim || function() { 37 | return this.replace(/^\s+|\s+$/g, ''); 38 | }; 39 | 40 | var escape = function(html, encode) { 41 | return html 42 | .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&') 43 | .replace(//g, '>') 45 | .replace(/"/g, '"') 46 | .replace(/'/g, '''); 47 | }; 48 | 49 | var main = __MAIN__; 50 | 51 | main(); 52 | 53 | }).call(this); 54 | -------------------------------------------------------------------------------- /deps/marked/test/fix: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd $(dirname "$0") 4 | 5 | cat README 6 | 7 | rm -rf tests 8 | cp -r original tests 9 | 10 | node fix.js 11 | 12 | cp new/* -t tests 13 | -------------------------------------------------------------------------------- /deps/marked/test/fix.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Markdown Test Suite Fixer 3 | */ 4 | 5 | // this file is responsible for "fixing" 6 | // the markdown test suite. there are 7 | // certain aspects of the suite that 8 | // are strange or will make my tests 9 | // fail for reasons unrelated to 10 | // conformance. 11 | 12 | var path = require('path') 13 | , fs = require('fs') 14 | , dir = __dirname + '/tests'; 15 | 16 | // fix unencoded quotes 17 | fs.readdirSync(dir).filter(function(file) { 18 | return path.extname(file) === '.html'; 19 | }).forEach(function(file) { 20 | var file = path.join(dir, file) 21 | , html = fs.readFileSync(file, 'utf8'); 22 | 23 | html = html 24 | .replace(/='([^\n']*)'(?=[^<>\n]*>)/g, '=&__APOS__;$1&__APOS__;') 25 | .replace(/="([^\n"]*)"(?=[^<>\n]*>)/g, '=&__QUOT__;$1&__QUOT__;') 26 | .replace(/"/g, '"') 27 | .replace(/'/g, ''') 28 | .replace(/&__QUOT__;/g, '"') 29 | .replace(/&__APOS__;/g, '\''); 30 | 31 | fs.writeFileSync(file, html); 32 | }); 33 | 34 | // turn
    into
    35 | fs.readdirSync(dir).forEach(function(file) { 36 | var file = path.join(dir, file) 37 | , text = fs.readFileSync(file, 'utf8'); 38 | 39 | text = text.replace(/(<|<)hr\s*\/(>|>)/g, '$1hr$2'); 40 | 41 | fs.writeFileSync(file, text); 42 | }); 43 | 44 | // markdown does some strange things. 45 | // it does not encode naked `>`, marked does. 46 | (function() { 47 | var file = dir + '/amps_and_angles_encoding.html'; 48 | var html = fs.readFileSync(file, 'utf8') 49 | .replace('6 > 5.', '6 > 5.'); 50 | 51 | fs.writeFileSync(file, html); 52 | })(); 53 | -------------------------------------------------------------------------------- /deps/marked/test/index.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var fs = require('fs') 4 | , path = require('path') 5 | , marked = require('marked') 6 | , dir = __dirname + '/tests'; 7 | 8 | var BREAK_ON_ERROR = false; 9 | 10 | var files; 11 | 12 | var load = function() { 13 | files = {}; 14 | 15 | var list = fs 16 | .readdirSync(dir) 17 | .filter(function(file) { 18 | return path.extname(file) !== '.html'; 19 | }) 20 | .sort(function(a, b) { 21 | a = path.basename(a).toLowerCase().charCodeAt(0); 22 | b = path.basename(b).toLowerCase().charCodeAt(0); 23 | return a > b ? 1 : (a < b ? -1 : 0); 24 | }); 25 | 26 | var i = 0 27 | , l = list.length 28 | , file; 29 | 30 | for (; i < l; i++) { 31 | file = path.join(dir, list[i]); 32 | files[path.basename(file)] = { 33 | text: fs.readFileSync(file, 'utf8'), 34 | html: fs.readFileSync(file.replace(/[^.]+$/, 'html'), 'utf8') 35 | }; 36 | } 37 | 38 | return files; 39 | }; 40 | 41 | var main = function() { 42 | if (!files) load(); 43 | 44 | var complete = 0 45 | , keys = Object.keys(files) 46 | , i_ = 0 47 | , l_ = keys.length 48 | , filename 49 | , file 50 | , text 51 | , html; 52 | 53 | main: 54 | for (; i_ < l_; i_++) { 55 | filename = keys[i_]; 56 | file = files[filename]; 57 | 58 | try { 59 | text = marked(file.text).replace(/\s/g, ''); 60 | html = file.html.replace(/\s/g, ''); 61 | } catch(e) { 62 | console.log('%s failed.', filename); 63 | throw e; 64 | } 65 | 66 | var i = 0 67 | , l = html.length; 68 | 69 | for (; i < l; i++) { 70 | if (text[i] !== html[i]) { 71 | text = text.substring( 72 | Math.max(i - 30, 0), 73 | Math.min(i + 30, text.length)); 74 | 75 | html = html.substring( 76 | Math.max(i - 30, 0), 77 | Math.min(i + 30, html.length)); 78 | 79 | console.log( 80 | '\n#%d. %s failed at offset %d. Near: "%s".\n', 81 | i_ + 1, filename, i, text); 82 | 83 | console.log('\nGot:\n%s\n', text.trim() || text); 84 | console.log('\nExpected:\n%s\n', html.trim() || html); 85 | 86 | if (BREAK_ON_ERROR) { 87 | break main; 88 | } else { 89 | break; 90 | } 91 | } 92 | } 93 | 94 | if (i === l) { 95 | complete++; 96 | console.log('#%d. %s completed.', i_ + 1, filename); 97 | } 98 | } 99 | 100 | console.log('%d/%d tests completed successfully.', complete, l_); 101 | }; 102 | 103 | main.bench = function(name, func) { 104 | if (!files) { 105 | load(); 106 | // change certain tests. to allow 107 | // comparison to older benchmark times. 108 | fs.readdirSync(__dirname + '/new').forEach(function(name) { 109 | if (name.split('.').pop() === 'html') return; 110 | if (name === 'main.text') return; 111 | delete files[name]; 112 | }); 113 | files['backslash_escapes.text'] = { 114 | text: 'hello world \\[how](are you) today' 115 | }; 116 | files['main.text'].text = files['main.text'].text.replace('* * *\n\n', ''); 117 | } 118 | 119 | var start = Date.now() 120 | , times = 1000 121 | , keys = Object.keys(files) 122 | , i = 0 123 | , l = keys.length 124 | , filename 125 | , file; 126 | 127 | while (times--) { 128 | for (i = 0; i < l; i++) { 129 | filename = keys[i]; 130 | file = files[filename]; 131 | func(file.text); 132 | } 133 | } 134 | 135 | console.log('%s completed in %dms.', name, Date.now() - start); 136 | }; 137 | 138 | var bench = function() { 139 | marked.setOptions({ gfm: false }); 140 | main.bench('marked', marked); 141 | 142 | marked.setOptions({ gfm: true }); 143 | main.bench('marked (gfm)', marked); 144 | 145 | marked.setOptions({ pedantic: true }); 146 | main.bench('marked (pedantic)', marked); 147 | 148 | var discount = require('discount').parse; 149 | main.bench('discount', discount); 150 | 151 | var showdown = (function() { 152 | var Showdown = require('showdown').Showdown; 153 | var convert = new Showdown.converter(); 154 | return function(text) { 155 | return convert.makeHtml(text); 156 | }; 157 | })(); 158 | main.bench('showdown (reuse converter)', showdown); 159 | 160 | var showdown_slow = (function() { 161 | var Showdown = require('showdown').Showdown; 162 | return function(text) { 163 | var convert = new Showdown.converter(); 164 | return convert.makeHtml(text); 165 | }; 166 | })(); 167 | main.bench('showdown (new converter)', showdown_slow); 168 | 169 | var markdownjs = require('markdown'); 170 | main.bench('markdown-js', function(text) { 171 | markdownjs.parse(text); 172 | }); 173 | }; 174 | 175 | var time = function() { 176 | var marked = require('../'); 177 | main.bench('marked', marked); 178 | }; 179 | 180 | if (!module.parent) { 181 | if (~process.argv.indexOf('--bench')) { 182 | bench(); 183 | } else if (~process.argv.indexOf('--time')) { 184 | time(); 185 | } else { 186 | main(); 187 | } 188 | } else { 189 | main.main = main; 190 | main.load = load; 191 | module.exports = main; 192 | } 193 | -------------------------------------------------------------------------------- /deps/marked/test/new/blockquote_list_item.html: -------------------------------------------------------------------------------- 1 |

    This fails in markdown.pl and upskirt:

    2 | 3 | 4 | -------------------------------------------------------------------------------- /deps/marked/test/new/blockquote_list_item.text: -------------------------------------------------------------------------------- 1 | This fails in markdown.pl and upskirt: 2 | 3 | * hello 4 | > world 5 | -------------------------------------------------------------------------------- /deps/marked/test/new/case_insensitive_refs.html: -------------------------------------------------------------------------------- 1 |

    hi

    2 | -------------------------------------------------------------------------------- /deps/marked/test/new/case_insensitive_refs.text: -------------------------------------------------------------------------------- 1 | [hi] 2 | 3 | [HI]: /url 4 | -------------------------------------------------------------------------------- /deps/marked/test/new/escaped_angles.html: -------------------------------------------------------------------------------- 1 |

    >

    2 | -------------------------------------------------------------------------------- /deps/marked/test/new/escaped_angles.text: -------------------------------------------------------------------------------- 1 | \> 2 | -------------------------------------------------------------------------------- /deps/marked/test/new/gfm_break.html: -------------------------------------------------------------------------------- 1 |

    Look at the
    pretty line
    breaks.

    2 | -------------------------------------------------------------------------------- /deps/marked/test/new/gfm_break.text: -------------------------------------------------------------------------------- 1 | Look at the 2 | pretty line 3 | breaks. 4 | -------------------------------------------------------------------------------- /deps/marked/test/new/gfm_code.html: -------------------------------------------------------------------------------- 1 |
    var a = 'hello';
    2 | console.log(a + ' world');
    3 | 
    4 | -------------------------------------------------------------------------------- /deps/marked/test/new/gfm_code.text: -------------------------------------------------------------------------------- 1 | ``` js 2 | var a = 'hello'; 3 | console.log(a + ' world'); 4 | ``` 5 | -------------------------------------------------------------------------------- /deps/marked/test/new/gfm_em.html: -------------------------------------------------------------------------------- 1 |

    These words should_not_be_emphasized.

    2 | -------------------------------------------------------------------------------- /deps/marked/test/new/gfm_em.text: -------------------------------------------------------------------------------- 1 | These words should_not_be_emphasized. 2 | -------------------------------------------------------------------------------- /deps/marked/test/new/gfm_links.html: -------------------------------------------------------------------------------- 1 |

    This should be a link: 2 | http://example.com/hello-world.

    3 | -------------------------------------------------------------------------------- /deps/marked/test/new/gfm_links.text: -------------------------------------------------------------------------------- 1 | This should be a link: http://example.com/hello-world. 2 | -------------------------------------------------------------------------------- /deps/marked/test/new/hr_list_break.html: -------------------------------------------------------------------------------- 1 | 7 | 8 |
    9 | 10 |

    you today?

    11 | -------------------------------------------------------------------------------- /deps/marked/test/new/hr_list_break.text: -------------------------------------------------------------------------------- 1 | * hello 2 | world 3 | * how 4 | are 5 | * * * 6 | you today? 7 | -------------------------------------------------------------------------------- /deps/marked/test/new/lazy_blockquotes.html: -------------------------------------------------------------------------------- 1 |
    2 |

    hi there 3 | bud

    4 |
    5 | -------------------------------------------------------------------------------- /deps/marked/test/new/lazy_blockquotes.text: -------------------------------------------------------------------------------- 1 | > hi there 2 | bud 3 | -------------------------------------------------------------------------------- /deps/marked/test/new/list_item_text.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /deps/marked/test/new/list_item_text.text: -------------------------------------------------------------------------------- 1 | * item1 2 | 3 | * item2 4 | 5 | text 6 | -------------------------------------------------------------------------------- /deps/marked/test/new/loose_lists.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |

    better behavior:

    13 | 14 | 17 | 18 | 19 | 20 | 25 | 26 | 27 | 28 | 33 | 34 | 35 | 36 | 43 | 44 | 45 | 46 | 53 | 54 | 55 | 56 | 63 | -------------------------------------------------------------------------------- /deps/marked/test/new/loose_lists.text: -------------------------------------------------------------------------------- 1 | * hello 2 | world 3 | 4 | how 5 | are 6 | * you 7 | 8 | 9 | 10 | better behavior: 11 | 12 | * hello 13 | * world 14 | how 15 | 16 | are 17 | you 18 | 19 | * today 20 | * hi 21 | 22 | 23 | 24 | * hello 25 | 26 | * world 27 | * hi 28 | 29 | 30 | 31 | * hello 32 | * world 33 | 34 | * hi 35 | 36 | 37 | 38 | * hello 39 | * world 40 | 41 | how 42 | * hi 43 | 44 | 45 | 46 | * hello 47 | * world 48 | * how 49 | 50 | are 51 | 52 | 53 | 54 | * hello 55 | * world 56 | 57 | * how 58 | 59 | are 60 | -------------------------------------------------------------------------------- /deps/marked/test/new/main.html: -------------------------------------------------------------------------------- 1 |

    A heading

    Just a note, I've found that I can't test my markdown parser vs others. For example, both markdown.js and showdown code blocks in lists wrong. They're also completely inconsistent with regards to paragraphs in list items.

    A link. Not anymore.

    Paragraph.

    • bq Item 1
    • bq Item 2
      • New bq Item 1
      • New bq Item 2 Text here

    Another blockquote! I really need to get more creative with mockup text.. markdown.js breaks here again

    Another Heading

    Hello world. Here is a link. And an image alt.

    Code goes here.
    4 | Lots of it...
    5 | -------------------------------------------------------------------------------- /deps/marked/test/new/main.text: -------------------------------------------------------------------------------- 1 | [test]: http://google.com/ "Google" 2 | 3 | # A heading 4 | 5 | Just a note, I've found that I can't test my markdown parser vs others. 6 | For example, both markdown.js and showdown code blocks in lists wrong. They're 7 | also completely [inconsistent][test] with regards to paragraphs in list items. 8 | 9 | A link. Not anymore. 10 | 11 | 13 | 14 | * List Item 1 15 | 16 | * List Item 2 17 | * New List Item 1 18 | Hi, this is a list item. 19 | * New List Item 2 20 | Another item 21 | Code goes here. 22 | Lots of it... 23 | * New List Item 3 24 | The last item 25 | 26 | * List Item 3 27 | The final item. 28 | 29 | * List Item 4 30 | The real final item. 31 | 32 | Paragraph. 33 | 34 | > * bq Item 1 35 | > * bq Item 2 36 | > * New bq Item 1 37 | > * New bq Item 2 38 | > Text here 39 | 40 | * * * 41 | 42 | > Another blockquote! 43 | > I really need to get 44 | > more creative with 45 | > mockup text.. 46 | > markdown.js breaks here again 47 | 48 | Another Heading 49 | ------------- 50 | 51 | Hello *world*. Here is a [link](//hello). 52 | And an image ![alt](src). 53 | 54 | Code goes here. 55 | Lots of it... 56 | -------------------------------------------------------------------------------- /deps/marked/test/new/nested_code.html: -------------------------------------------------------------------------------- 1 |

    hi ther `` ok ```

    2 | -------------------------------------------------------------------------------- /deps/marked/test/new/nested_code.text: -------------------------------------------------------------------------------- 1 | ````` hi ther `` ok ``` ````` 2 | -------------------------------------------------------------------------------- /deps/marked/test/new/nested_em.html: -------------------------------------------------------------------------------- 1 |

    test test test

    2 | 3 |

    test test test

    4 | -------------------------------------------------------------------------------- /deps/marked/test/new/nested_em.text: -------------------------------------------------------------------------------- 1 | *test **test** test* 2 | 3 | _test __test__ test_ 4 | -------------------------------------------------------------------------------- /deps/marked/test/new/nested_square_link.html: -------------------------------------------------------------------------------- 1 |

    the ] character

    2 | -------------------------------------------------------------------------------- /deps/marked/test/new/nested_square_link.text: -------------------------------------------------------------------------------- 1 | [the `]` character](/url) 2 | -------------------------------------------------------------------------------- /deps/marked/test/new/not_a_link.html: -------------------------------------------------------------------------------- 1 |

    \[test](not a link)

    2 | -------------------------------------------------------------------------------- /deps/marked/test/new/not_a_link.text: -------------------------------------------------------------------------------- 1 | \\[test](not a link) 2 | -------------------------------------------------------------------------------- /deps/marked/test/new/ref_paren.html: -------------------------------------------------------------------------------- 1 |

    hi

    2 | -------------------------------------------------------------------------------- /deps/marked/test/new/ref_paren.text: -------------------------------------------------------------------------------- 1 | [hi] 2 | 3 | [hi]: /url (there) 4 | -------------------------------------------------------------------------------- /deps/marked/test/new/same_bullet.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /deps/marked/test/new/same_bullet.text: -------------------------------------------------------------------------------- 1 | * test 2 | + test 3 | - test 4 | -------------------------------------------------------------------------------- /deps/marked/test/new/toplevel_paragraphs.html: -------------------------------------------------------------------------------- 1 |

    hello world 2 | how are you 3 | how are you

    4 | 5 |

    hello world

    6 |
    how are you
    7 | 8 |

    hello world

    9 |
    10 | 11 |

    hello world

    12 |

    how are you

    13 | 14 |

    hello world

    15 |

    how are you

    16 | 17 |

    hello world

    18 |

    how are you

    19 | 20 |

    hello world 21 | * how are you

    22 | 23 |

    hello world

    24 |
    how are you
    25 | 26 |

    hello world 27 | how are you

    28 | 29 |

    hello world 30 |

    31 | 32 |
    hello
    33 | 34 |

    hello

    35 | -------------------------------------------------------------------------------- /deps/marked/test/new/toplevel_paragraphs.text: -------------------------------------------------------------------------------- 1 | hello world 2 | how are you 3 | how are you 4 | 5 | hello world 6 | ``` 7 | how are you 8 | ``` 9 | 10 | hello world 11 | * * * 12 | 13 | hello world 14 | # how are you 15 | 16 | hello world 17 | how are you 18 | =========== 19 | 20 | hello world 21 | > how are you 22 | 23 | hello world 24 | * how are you 25 | 26 | hello world 27 |
    how are you
    28 | 29 | hello world 30 | how are you 31 | 32 | hello [world][how] 33 | [how]: /are/you 34 | 35 |
    hello
    36 | 37 | hello 38 | -------------------------------------------------------------------------------- /deps/marked/test/new/tricky_list.html: -------------------------------------------------------------------------------- 1 |

    hello world

    2 | 3 | 6 | 7 |

    hello world

    8 | 9 | 12 | 13 |

    hello world

    14 | 15 | 18 | 19 |

    hello world

    20 | 21 | 24 | -------------------------------------------------------------------------------- /deps/marked/test/new/tricky_list.text: -------------------------------------------------------------------------------- 1 | **hello** _world_ 2 | 3 | * hello world 4 | 5 | **hello** _world_ 6 | 7 | * hello world 8 | 9 | **hello** _world_ 10 | 11 | * Hello world 12 | 13 | **hello** _world_ 14 | 15 | * hello world 16 | -------------------------------------------------------------------------------- /deps/marked/test/original/amps_and_angles_encoding.html: -------------------------------------------------------------------------------- 1 |

    AT&T has an ampersand in their name.

    2 | 3 |

    AT&T is another way to write it.

    4 | 5 |

    This & that.

    6 | 7 |

    4 < 5.

    8 | 9 |

    6 > 5.

    10 | 11 |

    Here's a link with an ampersand in the URL.

    12 | 13 |

    Here's a link with an amersand in the link text: AT&T.

    14 | 15 |

    Here's an inline link.

    16 | 17 |

    Here's an inline link.

    18 | -------------------------------------------------------------------------------- /deps/marked/test/original/amps_and_angles_encoding.text: -------------------------------------------------------------------------------- 1 | AT&T has an ampersand in their name. 2 | 3 | AT&T is another way to write it. 4 | 5 | This & that. 6 | 7 | 4 < 5. 8 | 9 | 6 > 5. 10 | 11 | Here's a [link] [1] with an ampersand in the URL. 12 | 13 | Here's a link with an amersand in the link text: [AT&T] [2]. 14 | 15 | Here's an inline [link](/script?foo=1&bar=2). 16 | 17 | Here's an inline [link](). 18 | 19 | 20 | [1]: http://example.com/?foo=1&bar=2 21 | [2]: http://att.com/ "AT&T" 22 | -------------------------------------------------------------------------------- /deps/marked/test/original/auto_links.html: -------------------------------------------------------------------------------- 1 |

    Link: http://example.com/.

    2 | 3 |

    With an ampersand: http://example.com/?foo=1&bar=2

    4 | 5 | 10 | 11 |
    12 |

    Blockquoted: http://example.com/

    13 |
    14 | 15 |

    Auto-links should not occur here: <http://example.com/>

    16 | 17 |
    or here: <http://example.com/>
    18 | 
    19 | -------------------------------------------------------------------------------- /deps/marked/test/original/auto_links.text: -------------------------------------------------------------------------------- 1 | Link: . 2 | 3 | With an ampersand: 4 | 5 | * In a list? 6 | * 7 | * It should. 8 | 9 | > Blockquoted: 10 | 11 | Auto-links should not occur here: `` 12 | 13 | or here: 14 | -------------------------------------------------------------------------------- /deps/marked/test/original/backslash_escapes.html: -------------------------------------------------------------------------------- 1 |

    These should all get escaped:

    2 | 3 |

    Backslash: \

    4 | 5 |

    Backtick: `

    6 | 7 |

    Asterisk: *

    8 | 9 |

    Underscore: _

    10 | 11 |

    Left brace: {

    12 | 13 |

    Right brace: }

    14 | 15 |

    Left bracket: [

    16 | 17 |

    Right bracket: ]

    18 | 19 |

    Left paren: (

    20 | 21 |

    Right paren: )

    22 | 23 |

    Greater-than: >

    24 | 25 |

    Hash: #

    26 | 27 |

    Period: .

    28 | 29 |

    Bang: !

    30 | 31 |

    Plus: +

    32 | 33 |

    Minus: -

    34 | 35 |

    These should not, because they occur within a code block:

    36 | 37 |
    Backslash: \\
     38 | 
     39 | Backtick: \`
     40 | 
     41 | Asterisk: \*
     42 | 
     43 | Underscore: \_
     44 | 
     45 | Left brace: \{
     46 | 
     47 | Right brace: \}
     48 | 
     49 | Left bracket: \[
     50 | 
     51 | Right bracket: \]
     52 | 
     53 | Left paren: \(
     54 | 
     55 | Right paren: \)
     56 | 
     57 | Greater-than: \>
     58 | 
     59 | Hash: \#
     60 | 
     61 | Period: \.
     62 | 
     63 | Bang: \!
     64 | 
     65 | Plus: \+
     66 | 
     67 | Minus: \-
     68 | 
    69 | 70 |

    Nor should these, which occur in code spans:

    71 | 72 |

    Backslash: \\

    73 | 74 |

    Backtick: \`

    75 | 76 |

    Asterisk: \*

    77 | 78 |

    Underscore: \_

    79 | 80 |

    Left brace: \{

    81 | 82 |

    Right brace: \}

    83 | 84 |

    Left bracket: \[

    85 | 86 |

    Right bracket: \]

    87 | 88 |

    Left paren: \(

    89 | 90 |

    Right paren: \)

    91 | 92 |

    Greater-than: \>

    93 | 94 |

    Hash: \#

    95 | 96 |

    Period: \.

    97 | 98 |

    Bang: \!

    99 | 100 |

    Plus: \+

    101 | 102 |

    Minus: \-

    103 | 104 | 105 |

    These should get escaped, even though they're matching pairs for 106 | other Markdown constructs:

    107 | 108 |

    *asterisks*

    109 | 110 |

    _underscores_

    111 | 112 |

    `backticks`

    113 | 114 |

    This is a code span with a literal backslash-backtick sequence: \`

    115 | 116 |

    This is a tag with unescaped backticks bar.

    117 | 118 |

    This is a tag with backslashes bar.

    119 | -------------------------------------------------------------------------------- /deps/marked/test/original/backslash_escapes.text: -------------------------------------------------------------------------------- 1 | These should all get escaped: 2 | 3 | Backslash: \\ 4 | 5 | Backtick: \` 6 | 7 | Asterisk: \* 8 | 9 | Underscore: \_ 10 | 11 | Left brace: \{ 12 | 13 | Right brace: \} 14 | 15 | Left bracket: \[ 16 | 17 | Right bracket: \] 18 | 19 | Left paren: \( 20 | 21 | Right paren: \) 22 | 23 | Greater-than: \> 24 | 25 | Hash: \# 26 | 27 | Period: \. 28 | 29 | Bang: \! 30 | 31 | Plus: \+ 32 | 33 | Minus: \- 34 | 35 | 36 | 37 | These should not, because they occur within a code block: 38 | 39 | Backslash: \\ 40 | 41 | Backtick: \` 42 | 43 | Asterisk: \* 44 | 45 | Underscore: \_ 46 | 47 | Left brace: \{ 48 | 49 | Right brace: \} 50 | 51 | Left bracket: \[ 52 | 53 | Right bracket: \] 54 | 55 | Left paren: \( 56 | 57 | Right paren: \) 58 | 59 | Greater-than: \> 60 | 61 | Hash: \# 62 | 63 | Period: \. 64 | 65 | Bang: \! 66 | 67 | Plus: \+ 68 | 69 | Minus: \- 70 | 71 | 72 | Nor should these, which occur in code spans: 73 | 74 | Backslash: `\\` 75 | 76 | Backtick: `` \` `` 77 | 78 | Asterisk: `\*` 79 | 80 | Underscore: `\_` 81 | 82 | Left brace: `\{` 83 | 84 | Right brace: `\}` 85 | 86 | Left bracket: `\[` 87 | 88 | Right bracket: `\]` 89 | 90 | Left paren: `\(` 91 | 92 | Right paren: `\)` 93 | 94 | Greater-than: `\>` 95 | 96 | Hash: `\#` 97 | 98 | Period: `\.` 99 | 100 | Bang: `\!` 101 | 102 | Plus: `\+` 103 | 104 | Minus: `\-` 105 | 106 | 107 | These should get escaped, even though they're matching pairs for 108 | other Markdown constructs: 109 | 110 | \*asterisks\* 111 | 112 | \_underscores\_ 113 | 114 | \`backticks\` 115 | 116 | This is a code span with a literal backslash-backtick sequence: `` \` `` 117 | 118 | This is a tag with unescaped backticks bar. 119 | 120 | This is a tag with backslashes bar. 121 | -------------------------------------------------------------------------------- /deps/marked/test/original/blockquotes_with_code_blocks.html: -------------------------------------------------------------------------------- 1 |
    2 |

    Example:

    3 | 4 |
    sub status {
     5 |     print "working";
     6 | }
     7 | 
    8 | 9 |

    Or:

    10 | 11 |
    sub status {
    12 |     return "working";
    13 | }
    14 | 
    15 |
    16 | -------------------------------------------------------------------------------- /deps/marked/test/original/blockquotes_with_code_blocks.text: -------------------------------------------------------------------------------- 1 | > Example: 2 | > 3 | > sub status { 4 | > print "working"; 5 | > } 6 | > 7 | > Or: 8 | > 9 | > sub status { 10 | > return "working"; 11 | > } 12 | -------------------------------------------------------------------------------- /deps/marked/test/original/code_blocks.html: -------------------------------------------------------------------------------- 1 |
    code block on the first line
     2 | 
    3 | 4 |

    Regular text.

    5 | 6 |
    code block indented by spaces
     7 | 
    8 | 9 |

    Regular text.

    10 | 11 |
    the lines in this block  
    12 | all contain trailing spaces  
    13 | 
    14 | 15 |

    Regular Text.

    16 | 17 |
    code block on the last line
    18 | 
    19 | -------------------------------------------------------------------------------- /deps/marked/test/original/code_blocks.text: -------------------------------------------------------------------------------- 1 | code block on the first line 2 | 3 | Regular text. 4 | 5 | code block indented by spaces 6 | 7 | Regular text. 8 | 9 | the lines in this block 10 | all contain trailing spaces 11 | 12 | Regular Text. 13 | 14 | code block on the last line 15 | -------------------------------------------------------------------------------- /deps/marked/test/original/code_spans.html: -------------------------------------------------------------------------------- 1 |

    <test a=" content of attribute ">

    2 | 3 |

    Fix for backticks within HTML tag: like this

    4 | 5 |

    Here's how you put `backticks` in a code span.

    6 | 7 | -------------------------------------------------------------------------------- /deps/marked/test/original/code_spans.text: -------------------------------------------------------------------------------- 1 | `` 2 | 3 | Fix for backticks within HTML tag: like this 4 | 5 | Here's how you put `` `backticks` `` in a code span. 6 | 7 | -------------------------------------------------------------------------------- /deps/marked/test/original/hard_wrapped_paragraphs_with_list_like_lines.html: -------------------------------------------------------------------------------- 1 |

    In Markdown 1.0.0 and earlier. Version 2 | 8. This line turns into a list item. 3 | Because a hard-wrapped line in the 4 | middle of a paragraph looked like a 5 | list item.

    6 | 7 |

    Here's one with a bullet. 8 | * criminey.

    9 | -------------------------------------------------------------------------------- /deps/marked/test/original/hard_wrapped_paragraphs_with_list_like_lines.text: -------------------------------------------------------------------------------- 1 | In Markdown 1.0.0 and earlier. Version 2 | 8. This line turns into a list item. 3 | Because a hard-wrapped line in the 4 | middle of a paragraph looked like a 5 | list item. 6 | 7 | Here's one with a bullet. 8 | * criminey. 9 | -------------------------------------------------------------------------------- /deps/marked/test/original/horizontal_rules.html: -------------------------------------------------------------------------------- 1 |

    Dashes:

    2 | 3 |
    4 | 5 |
    6 | 7 |
    8 | 9 |
    10 | 11 |
    ---
    12 | 
    13 | 14 |
    15 | 16 |
    17 | 18 |
    19 | 20 |
    21 | 22 |
    - - -
    23 | 
    24 | 25 |

    Asterisks:

    26 | 27 |
    28 | 29 |
    30 | 31 |
    32 | 33 |
    34 | 35 |
    ***
    36 | 
    37 | 38 |
    39 | 40 |
    41 | 42 |
    43 | 44 |
    45 | 46 |
    * * *
    47 | 
    48 | 49 |

    Underscores:

    50 | 51 |
    52 | 53 |
    54 | 55 |
    56 | 57 |
    58 | 59 |
    ___
    60 | 
    61 | 62 |
    63 | 64 |
    65 | 66 |
    67 | 68 |
    69 | 70 |
    _ _ _
    71 | 
    72 | -------------------------------------------------------------------------------- /deps/marked/test/original/horizontal_rules.text: -------------------------------------------------------------------------------- 1 | Dashes: 2 | 3 | --- 4 | 5 | --- 6 | 7 | --- 8 | 9 | --- 10 | 11 | --- 12 | 13 | - - - 14 | 15 | - - - 16 | 17 | - - - 18 | 19 | - - - 20 | 21 | - - - 22 | 23 | 24 | Asterisks: 25 | 26 | *** 27 | 28 | *** 29 | 30 | *** 31 | 32 | *** 33 | 34 | *** 35 | 36 | * * * 37 | 38 | * * * 39 | 40 | * * * 41 | 42 | * * * 43 | 44 | * * * 45 | 46 | 47 | Underscores: 48 | 49 | ___ 50 | 51 | ___ 52 | 53 | ___ 54 | 55 | ___ 56 | 57 | ___ 58 | 59 | _ _ _ 60 | 61 | _ _ _ 62 | 63 | _ _ _ 64 | 65 | _ _ _ 66 | 67 | _ _ _ 68 | -------------------------------------------------------------------------------- /deps/marked/test/original/inline_html_advanced.html: -------------------------------------------------------------------------------- 1 |

    Simple block on one line:

    2 | 3 |
    foo
    4 | 5 |

    And nested without indentation:

    6 | 7 |
    8 |
    9 |
    10 | foo 11 |
    12 |
    13 |
    14 |
    bar
    15 |
    16 | -------------------------------------------------------------------------------- /deps/marked/test/original/inline_html_advanced.text: -------------------------------------------------------------------------------- 1 | Simple block on one line: 2 | 3 |
    foo
    4 | 5 | And nested without indentation: 6 | 7 |
    8 |
    9 |
    10 | foo 11 |
    12 |
    13 |
    14 |
    bar
    15 |
    16 | -------------------------------------------------------------------------------- /deps/marked/test/original/inline_html_comments.html: -------------------------------------------------------------------------------- 1 |

    Paragraph one.

    2 | 3 | 4 | 5 | 8 | 9 |

    Paragraph two.

    10 | 11 | 12 | 13 |

    The end.

    14 | -------------------------------------------------------------------------------- /deps/marked/test/original/inline_html_comments.text: -------------------------------------------------------------------------------- 1 | Paragraph one. 2 | 3 | 4 | 5 | 8 | 9 | Paragraph two. 10 | 11 | 12 | 13 | The end. 14 | -------------------------------------------------------------------------------- /deps/marked/test/original/inline_html_simple.html: -------------------------------------------------------------------------------- 1 |

    Here's a simple block:

    2 | 3 |
    4 | foo 5 |
    6 | 7 |

    This should be a code block, though:

    8 | 9 |
    <div>
    10 |     foo
    11 | </div>
    12 | 
    13 | 14 |

    As should this:

    15 | 16 |
    <div>foo</div>
    17 | 
    18 | 19 |

    Now, nested:

    20 | 21 |
    22 |
    23 |
    24 | foo 25 |
    26 |
    27 |
    28 | 29 |

    This should just be an HTML comment:

    30 | 31 | 32 | 33 |

    Multiline:

    34 | 35 | 39 | 40 |

    Code block:

    41 | 42 |
    <!-- Comment -->
    43 | 
    44 | 45 |

    Just plain comment, with trailing spaces on the line:

    46 | 47 | 48 | 49 |

    Code:

    50 | 51 |
    <hr />
    52 | 
    53 | 54 |

    Hr's:

    55 | 56 |
    57 | 58 |
    59 | 60 |
    61 | 62 |
    63 | 64 |
    65 | 66 |
    67 | 68 |
    69 | 70 |
    71 | 72 |
    73 | -------------------------------------------------------------------------------- /deps/marked/test/original/inline_html_simple.text: -------------------------------------------------------------------------------- 1 | Here's a simple block: 2 | 3 |
    4 | foo 5 |
    6 | 7 | This should be a code block, though: 8 | 9 |
    10 | foo 11 |
    12 | 13 | As should this: 14 | 15 |
    foo
    16 | 17 | Now, nested: 18 | 19 |
    20 |
    21 |
    22 | foo 23 |
    24 |
    25 |
    26 | 27 | This should just be an HTML comment: 28 | 29 | 30 | 31 | Multiline: 32 | 33 | 37 | 38 | Code block: 39 | 40 | 41 | 42 | Just plain comment, with trailing spaces on the line: 43 | 44 | 45 | 46 | Code: 47 | 48 |
    49 | 50 | Hr's: 51 | 52 |
    53 | 54 |
    55 | 56 |
    57 | 58 |
    59 | 60 |
    61 | 62 |
    63 | 64 |
    65 | 66 |
    67 | 68 |
    69 | 70 | -------------------------------------------------------------------------------- /deps/marked/test/original/links_inline_style.html: -------------------------------------------------------------------------------- 1 |

    Just a URL.

    2 | 3 |

    URL and title.

    4 | 5 |

    URL and title.

    6 | 7 |

    URL and title.

    8 | 9 |

    URL and title.

    10 | 11 |

    Empty.

    12 | -------------------------------------------------------------------------------- /deps/marked/test/original/links_inline_style.text: -------------------------------------------------------------------------------- 1 | Just a [URL](/url/). 2 | 3 | [URL and title](/url/ "title"). 4 | 5 | [URL and title](/url/ "title preceded by two spaces"). 6 | 7 | [URL and title](/url/ "title preceded by a tab"). 8 | 9 | [URL and title](/url/ "title has spaces afterward" ). 10 | 11 | 12 | [Empty](). 13 | -------------------------------------------------------------------------------- /deps/marked/test/original/links_reference_style.html: -------------------------------------------------------------------------------- 1 |

    Foo bar.

    2 | 3 |

    Foo bar.

    4 | 5 |

    Foo bar.

    6 | 7 |

    With embedded [brackets].

    8 | 9 |

    Indented once.

    10 | 11 |

    Indented twice.

    12 | 13 |

    Indented thrice.

    14 | 15 |

    Indented [four][] times.

    16 | 17 |
    [four]: /url
    18 | 
    19 | 20 |
    21 | 22 |

    this should work

    23 | 24 |

    So should this.

    25 | 26 |

    And this.

    27 | 28 |

    And this.

    29 | 30 |

    And this.

    31 | 32 |

    But not [that] [].

    33 | 34 |

    Nor [that][].

    35 | 36 |

    Nor [that].

    37 | 38 |

    [Something in brackets like this should work]

    39 | 40 |

    [Same with this.]

    41 | 42 |

    In this case, this points to something else.

    43 | 44 |

    Backslashing should suppress [this] and [this].

    45 | 46 |
    47 | 48 |

    Here's one where the link 49 | breaks across lines.

    50 | 51 |

    Here's another where the link 52 | breaks across lines, but with a line-ending space.

    53 | -------------------------------------------------------------------------------- /deps/marked/test/original/links_reference_style.text: -------------------------------------------------------------------------------- 1 | Foo [bar] [1]. 2 | 3 | Foo [bar][1]. 4 | 5 | Foo [bar] 6 | [1]. 7 | 8 | [1]: /url/ "Title" 9 | 10 | 11 | With [embedded [brackets]] [b]. 12 | 13 | 14 | Indented [once][]. 15 | 16 | Indented [twice][]. 17 | 18 | Indented [thrice][]. 19 | 20 | Indented [four][] times. 21 | 22 | [once]: /url 23 | 24 | [twice]: /url 25 | 26 | [thrice]: /url 27 | 28 | [four]: /url 29 | 30 | 31 | [b]: /url/ 32 | 33 | * * * 34 | 35 | [this] [this] should work 36 | 37 | So should [this][this]. 38 | 39 | And [this] []. 40 | 41 | And [this][]. 42 | 43 | And [this]. 44 | 45 | But not [that] []. 46 | 47 | Nor [that][]. 48 | 49 | Nor [that]. 50 | 51 | [Something in brackets like [this][] should work] 52 | 53 | [Same with [this].] 54 | 55 | In this case, [this](/somethingelse/) points to something else. 56 | 57 | Backslashing should suppress \[this] and [this\]. 58 | 59 | [this]: foo 60 | 61 | 62 | * * * 63 | 64 | Here's one where the [link 65 | breaks] across lines. 66 | 67 | Here's another where the [link 68 | breaks] across lines, but with a line-ending space. 69 | 70 | 71 | [link breaks]: /url/ 72 | -------------------------------------------------------------------------------- /deps/marked/test/original/links_shortcut_references.html: -------------------------------------------------------------------------------- 1 |

    This is the simple case.

    2 | 3 |

    This one has a line 4 | break.

    5 | 6 |

    This one has a line 7 | break with a line-ending space.

    8 | 9 |

    this and the other

    10 | -------------------------------------------------------------------------------- /deps/marked/test/original/links_shortcut_references.text: -------------------------------------------------------------------------------- 1 | This is the [simple case]. 2 | 3 | [simple case]: /simple 4 | 5 | 6 | 7 | This one has a [line 8 | break]. 9 | 10 | This one has a [line 11 | break] with a line-ending space. 12 | 13 | [line break]: /foo 14 | 15 | 16 | [this] [that] and the [other] 17 | 18 | [this]: /this 19 | [that]: /that 20 | [other]: /other 21 | -------------------------------------------------------------------------------- /deps/marked/test/original/literal_quotes_in_titles.html: -------------------------------------------------------------------------------- 1 |

    Foo bar.

    2 | 3 |

    Foo bar.

    4 | -------------------------------------------------------------------------------- /deps/marked/test/original/literal_quotes_in_titles.text: -------------------------------------------------------------------------------- 1 | Foo [bar][]. 2 | 3 | Foo [bar](/url/ "Title with "quotes" inside"). 4 | 5 | 6 | [bar]: /url/ "Title with "quotes" inside" 7 | 8 | -------------------------------------------------------------------------------- /deps/marked/test/original/markdown_documentation_basics.html: -------------------------------------------------------------------------------- 1 |

    Markdown: Basics

    2 | 3 | 10 | 11 |

    Getting the Gist of Markdown's Formatting Syntax

    12 | 13 |

    This page offers a brief overview of what it's like to use Markdown. 14 | The syntax page provides complete, detailed documentation for 15 | every feature, but Markdown should be very easy to pick up simply by 16 | looking at a few examples of it in action. The examples on this page 17 | are written in a before/after style, showing example syntax and the 18 | HTML output produced by Markdown.

    19 | 20 |

    It's also helpful to simply try Markdown out; the Dingus is a 21 | web application that allows you type your own Markdown-formatted text 22 | and translate it to XHTML.

    23 | 24 |

    Note: This document is itself written using Markdown; you 25 | can see the source for it by adding '.text' to the URL.

    26 | 27 |

    Paragraphs, Headers, Blockquotes

    28 | 29 |

    A paragraph is simply one or more consecutive lines of text, separated 30 | by one or more blank lines. (A blank line is any line that looks like a 31 | blank line -- a line containing nothing spaces or tabs is considered 32 | blank.) Normal paragraphs should not be intended with spaces or tabs.

    33 | 34 |

    Markdown offers two styles of headers: Setext and atx. 35 | Setext-style headers for <h1> and <h2> are created by 36 | "underlining" with equal signs (=) and hyphens (-), respectively. 37 | To create an atx-style header, you put 1-6 hash marks (#) at the 38 | beginning of the line -- the number of hashes equals the resulting 39 | HTML header level.

    40 | 41 |

    Blockquotes are indicated using email-style '>' angle brackets.

    42 | 43 |

    Markdown:

    44 | 45 |
    A First Level Header
     46 | ====================
     47 | 
     48 | A Second Level Header
     49 | ---------------------
     50 | 
     51 | Now is the time for all good men to come to
     52 | the aid of their country. This is just a
     53 | regular paragraph.
     54 | 
     55 | The quick brown fox jumped over the lazy
     56 | dog's back.
     57 | 
     58 | ### Header 3
     59 | 
     60 | > This is a blockquote.
     61 | > 
     62 | > This is the second paragraph in the blockquote.
     63 | >
     64 | > ## This is an H2 in a blockquote
     65 | 
    66 | 67 |

    Output:

    68 | 69 |
    <h1>A First Level Header</h1>
     70 | 
     71 | <h2>A Second Level Header</h2>
     72 | 
     73 | <p>Now is the time for all good men to come to
     74 | the aid of their country. This is just a
     75 | regular paragraph.</p>
     76 | 
     77 | <p>The quick brown fox jumped over the lazy
     78 | dog's back.</p>
     79 | 
     80 | <h3>Header 3</h3>
     81 | 
     82 | <blockquote>
     83 |     <p>This is a blockquote.</p>
     84 | 
     85 |     <p>This is the second paragraph in the blockquote.</p>
     86 | 
     87 |     <h2>This is an H2 in a blockquote</h2>
     88 | </blockquote>
     89 | 
    90 | 91 |

    Phrase Emphasis

    92 | 93 |

    Markdown uses asterisks and underscores to indicate spans of emphasis.

    94 | 95 |

    Markdown:

    96 | 97 |
    Some of these words *are emphasized*.
     98 | Some of these words _are emphasized also_.
     99 | 
    100 | Use two asterisks for **strong emphasis**.
    101 | Or, if you prefer, __use two underscores instead__.
    102 | 
    103 | 104 |

    Output:

    105 | 106 |
    <p>Some of these words <em>are emphasized</em>.
    107 | Some of these words <em>are emphasized also</em>.</p>
    108 | 
    109 | <p>Use two asterisks for <strong>strong emphasis</strong>.
    110 | Or, if you prefer, <strong>use two underscores instead</strong>.</p>
    111 | 
    112 | 113 |

    Lists

    114 | 115 |

    Unordered (bulleted) lists use asterisks, pluses, and hyphens (*, 116 | +, and -) as list markers. These three markers are 117 | interchangable; this:

    118 | 119 |
    *   Candy.
    120 | *   Gum.
    121 | *   Booze.
    122 | 
    123 | 124 |

    this:

    125 | 126 |
    +   Candy.
    127 | +   Gum.
    128 | +   Booze.
    129 | 
    130 | 131 |

    and this:

    132 | 133 |
    -   Candy.
    134 | -   Gum.
    135 | -   Booze.
    136 | 
    137 | 138 |

    all produce the same output:

    139 | 140 |
    <ul>
    141 | <li>Candy.</li>
    142 | <li>Gum.</li>
    143 | <li>Booze.</li>
    144 | </ul>
    145 | 
    146 | 147 |

    Ordered (numbered) lists use regular numbers, followed by periods, as 148 | list markers:

    149 | 150 |
    1.  Red
    151 | 2.  Green
    152 | 3.  Blue
    153 | 
    154 | 155 |

    Output:

    156 | 157 |
    <ol>
    158 | <li>Red</li>
    159 | <li>Green</li>
    160 | <li>Blue</li>
    161 | </ol>
    162 | 
    163 | 164 |

    If you put blank lines between items, you'll get <p> tags for the 165 | list item text. You can create multi-paragraph list items by indenting 166 | the paragraphs by 4 spaces or 1 tab:

    167 | 168 |
    *   A list item.
    169 | 
    170 |     With multiple paragraphs.
    171 | 
    172 | *   Another item in the list.
    173 | 
    174 | 175 |

    Output:

    176 | 177 |
    <ul>
    178 | <li><p>A list item.</p>
    179 | <p>With multiple paragraphs.</p></li>
    180 | <li><p>Another item in the list.</p></li>
    181 | </ul>
    182 | 
    183 | 184 |

    Links

    185 | 186 |

    Markdown supports two styles for creating links: inline and 187 | reference. With both styles, you use square brackets to delimit the 188 | text you want to turn into a link.

    189 | 190 |

    Inline-style links use parentheses immediately after the link text. 191 | For example:

    192 | 193 |
    This is an [example link](http://example.com/).
    194 | 
    195 | 196 |

    Output:

    197 | 198 |
    <p>This is an <a href="http://example.com/">
    199 | example link</a>.</p>
    200 | 
    201 | 202 |

    Optionally, you may include a title attribute in the parentheses:

    203 | 204 |
    This is an [example link](http://example.com/ "With a Title").
    205 | 
    206 | 207 |

    Output:

    208 | 209 |
    <p>This is an <a href="http://example.com/" title="With a Title">
    210 | example link</a>.</p>
    211 | 
    212 | 213 |

    Reference-style links allow you to refer to your links by names, which 214 | you define elsewhere in your document:

    215 | 216 |
    I get 10 times more traffic from [Google][1] than from
    217 | [Yahoo][2] or [MSN][3].
    218 | 
    219 | [1]: http://google.com/        "Google"
    220 | [2]: http://search.yahoo.com/  "Yahoo Search"
    221 | [3]: http://search.msn.com/    "MSN Search"
    222 | 
    223 | 224 |

    Output:

    225 | 226 |
    <p>I get 10 times more traffic from <a href="http://google.com/"
    227 | title="Google">Google</a> than from <a href="http://search.yahoo.com/"
    228 | title="Yahoo Search">Yahoo</a> or <a href="http://search.msn.com/"
    229 | title="MSN Search">MSN</a>.</p>
    230 | 
    231 | 232 |

    The title attribute is optional. Link names may contain letters, 233 | numbers and spaces, but are not case sensitive:

    234 | 235 |
    I start my morning with a cup of coffee and
    236 | [The New York Times][NY Times].
    237 | 
    238 | [ny times]: http://www.nytimes.com/
    239 | 
    240 | 241 |

    Output:

    242 | 243 |
    <p>I start my morning with a cup of coffee and
    244 | <a href="http://www.nytimes.com/">The New York Times</a>.</p>
    245 | 
    246 | 247 |

    Images

    248 | 249 |

    Image syntax is very much like link syntax.

    250 | 251 |

    Inline (titles are optional):

    252 | 253 |
    ![alt text](/path/to/img.jpg "Title")
    254 | 
    255 | 256 |

    Reference-style:

    257 | 258 |
    ![alt text][id]
    259 | 
    260 | [id]: /path/to/img.jpg "Title"
    261 | 
    262 | 263 |

    Both of the above examples produce the same output:

    264 | 265 |
    <img src="/path/to/img.jpg" alt="alt text" title="Title" />
    266 | 
    267 | 268 |

    Code

    269 | 270 |

    In a regular paragraph, you can create code span by wrapping text in 271 | backtick quotes. Any ampersands (&) and angle brackets (< or 272 | >) will automatically be translated into HTML entities. This makes 273 | it easy to use Markdown to write about HTML example code:

    274 | 275 |
    I strongly recommend against using any `<blink>` tags.
    276 | 
    277 | I wish SmartyPants used named entities like `&mdash;`
    278 | instead of decimal-encoded entites like `&#8212;`.
    279 | 
    280 | 281 |

    Output:

    282 | 283 |
    <p>I strongly recommend against using any
    284 | <code>&lt;blink&gt;</code> tags.</p>
    285 | 
    286 | <p>I wish SmartyPants used named entities like
    287 | <code>&amp;mdash;</code> instead of decimal-encoded
    288 | entites like <code>&amp;#8212;</code>.</p>
    289 | 
    290 | 291 |

    To specify an entire block of pre-formatted code, indent every line of 292 | the block by 4 spaces or 1 tab. Just like with code spans, &, <, 293 | and > characters will be escaped automatically.

    294 | 295 |

    Markdown:

    296 | 297 |
    If you want your page to validate under XHTML 1.0 Strict,
    298 | you've got to put paragraph tags in your blockquotes:
    299 | 
    300 |     <blockquote>
    301 |         <p>For example.</p>
    302 |     </blockquote>
    303 | 
    304 | 305 |

    Output:

    306 | 307 |
    <p>If you want your page to validate under XHTML 1.0 Strict,
    308 | you've got to put paragraph tags in your blockquotes:</p>
    309 | 
    310 | <pre><code>&lt;blockquote&gt;
    311 |     &lt;p&gt;For example.&lt;/p&gt;
    312 | &lt;/blockquote&gt;
    313 | </code></pre>
    314 | 
    315 | -------------------------------------------------------------------------------- /deps/marked/test/original/markdown_documentation_basics.text: -------------------------------------------------------------------------------- 1 | Markdown: Basics 2 | ================ 3 | 4 | 11 | 12 | 13 | Getting the Gist of Markdown's Formatting Syntax 14 | ------------------------------------------------ 15 | 16 | This page offers a brief overview of what it's like to use Markdown. 17 | The [syntax page] [s] provides complete, detailed documentation for 18 | every feature, but Markdown should be very easy to pick up simply by 19 | looking at a few examples of it in action. The examples on this page 20 | are written in a before/after style, showing example syntax and the 21 | HTML output produced by Markdown. 22 | 23 | It's also helpful to simply try Markdown out; the [Dingus] [d] is a 24 | web application that allows you type your own Markdown-formatted text 25 | and translate it to XHTML. 26 | 27 | **Note:** This document is itself written using Markdown; you 28 | can [see the source for it by adding '.text' to the URL] [src]. 29 | 30 | [s]: /projects/markdown/syntax "Markdown Syntax" 31 | [d]: /projects/markdown/dingus "Markdown Dingus" 32 | [src]: /projects/markdown/basics.text 33 | 34 | 35 | ## Paragraphs, Headers, Blockquotes ## 36 | 37 | A paragraph is simply one or more consecutive lines of text, separated 38 | by one or more blank lines. (A blank line is any line that looks like a 39 | blank line -- a line containing nothing spaces or tabs is considered 40 | blank.) Normal paragraphs should not be intended with spaces or tabs. 41 | 42 | Markdown offers two styles of headers: *Setext* and *atx*. 43 | Setext-style headers for `

    ` and `

    ` are created by 44 | "underlining" with equal signs (`=`) and hyphens (`-`), respectively. 45 | To create an atx-style header, you put 1-6 hash marks (`#`) at the 46 | beginning of the line -- the number of hashes equals the resulting 47 | HTML header level. 48 | 49 | Blockquotes are indicated using email-style '`>`' angle brackets. 50 | 51 | Markdown: 52 | 53 | A First Level Header 54 | ==================== 55 | 56 | A Second Level Header 57 | --------------------- 58 | 59 | Now is the time for all good men to come to 60 | the aid of their country. This is just a 61 | regular paragraph. 62 | 63 | The quick brown fox jumped over the lazy 64 | dog's back. 65 | 66 | ### Header 3 67 | 68 | > This is a blockquote. 69 | > 70 | > This is the second paragraph in the blockquote. 71 | > 72 | > ## This is an H2 in a blockquote 73 | 74 | 75 | Output: 76 | 77 |

    A First Level Header

    78 | 79 |

    A Second Level Header

    80 | 81 |

    Now is the time for all good men to come to 82 | the aid of their country. This is just a 83 | regular paragraph.

    84 | 85 |

    The quick brown fox jumped over the lazy 86 | dog's back.

    87 | 88 |

    Header 3

    89 | 90 |
    91 |

    This is a blockquote.

    92 | 93 |

    This is the second paragraph in the blockquote.

    94 | 95 |

    This is an H2 in a blockquote

    96 |
    97 | 98 | 99 | 100 | ### Phrase Emphasis ### 101 | 102 | Markdown uses asterisks and underscores to indicate spans of emphasis. 103 | 104 | Markdown: 105 | 106 | Some of these words *are emphasized*. 107 | Some of these words _are emphasized also_. 108 | 109 | Use two asterisks for **strong emphasis**. 110 | Or, if you prefer, __use two underscores instead__. 111 | 112 | Output: 113 | 114 |

    Some of these words are emphasized. 115 | Some of these words are emphasized also.

    116 | 117 |

    Use two asterisks for strong emphasis. 118 | Or, if you prefer, use two underscores instead.

    119 | 120 | 121 | 122 | ## Lists ## 123 | 124 | Unordered (bulleted) lists use asterisks, pluses, and hyphens (`*`, 125 | `+`, and `-`) as list markers. These three markers are 126 | interchangable; this: 127 | 128 | * Candy. 129 | * Gum. 130 | * Booze. 131 | 132 | this: 133 | 134 | + Candy. 135 | + Gum. 136 | + Booze. 137 | 138 | and this: 139 | 140 | - Candy. 141 | - Gum. 142 | - Booze. 143 | 144 | all produce the same output: 145 | 146 |
      147 |
    • Candy.
    • 148 |
    • Gum.
    • 149 |
    • Booze.
    • 150 |
    151 | 152 | Ordered (numbered) lists use regular numbers, followed by periods, as 153 | list markers: 154 | 155 | 1. Red 156 | 2. Green 157 | 3. Blue 158 | 159 | Output: 160 | 161 |
      162 |
    1. Red
    2. 163 |
    3. Green
    4. 164 |
    5. Blue
    6. 165 |
    166 | 167 | If you put blank lines between items, you'll get `

    ` tags for the 168 | list item text. You can create multi-paragraph list items by indenting 169 | the paragraphs by 4 spaces or 1 tab: 170 | 171 | * A list item. 172 | 173 | With multiple paragraphs. 174 | 175 | * Another item in the list. 176 | 177 | Output: 178 | 179 |

      180 |
    • A list item.

      181 |

      With multiple paragraphs.

    • 182 |
    • Another item in the list.

    • 183 |
    184 | 185 | 186 | 187 | ### Links ### 188 | 189 | Markdown supports two styles for creating links: *inline* and 190 | *reference*. With both styles, you use square brackets to delimit the 191 | text you want to turn into a link. 192 | 193 | Inline-style links use parentheses immediately after the link text. 194 | For example: 195 | 196 | This is an [example link](http://example.com/). 197 | 198 | Output: 199 | 200 |

    This is an 201 | example link.

    202 | 203 | Optionally, you may include a title attribute in the parentheses: 204 | 205 | This is an [example link](http://example.com/ "With a Title"). 206 | 207 | Output: 208 | 209 |

    This is an 210 | example link.

    211 | 212 | Reference-style links allow you to refer to your links by names, which 213 | you define elsewhere in your document: 214 | 215 | I get 10 times more traffic from [Google][1] than from 216 | [Yahoo][2] or [MSN][3]. 217 | 218 | [1]: http://google.com/ "Google" 219 | [2]: http://search.yahoo.com/ "Yahoo Search" 220 | [3]: http://search.msn.com/ "MSN Search" 221 | 222 | Output: 223 | 224 |

    I get 10 times more traffic from Google than from Yahoo or MSN.

    228 | 229 | The title attribute is optional. Link names may contain letters, 230 | numbers and spaces, but are *not* case sensitive: 231 | 232 | I start my morning with a cup of coffee and 233 | [The New York Times][NY Times]. 234 | 235 | [ny times]: http://www.nytimes.com/ 236 | 237 | Output: 238 | 239 |

    I start my morning with a cup of coffee and 240 | The New York Times.

    241 | 242 | 243 | ### Images ### 244 | 245 | Image syntax is very much like link syntax. 246 | 247 | Inline (titles are optional): 248 | 249 | ![alt text](/path/to/img.jpg "Title") 250 | 251 | Reference-style: 252 | 253 | ![alt text][id] 254 | 255 | [id]: /path/to/img.jpg "Title" 256 | 257 | Both of the above examples produce the same output: 258 | 259 | alt text 260 | 261 | 262 | 263 | ### Code ### 264 | 265 | In a regular paragraph, you can create code span by wrapping text in 266 | backtick quotes. Any ampersands (`&`) and angle brackets (`<` or 267 | `>`) will automatically be translated into HTML entities. This makes 268 | it easy to use Markdown to write about HTML example code: 269 | 270 | I strongly recommend against using any `` tags. 271 | 272 | I wish SmartyPants used named entities like `—` 273 | instead of decimal-encoded entites like `—`. 274 | 275 | Output: 276 | 277 |

    I strongly recommend against using any 278 | <blink> tags.

    279 | 280 |

    I wish SmartyPants used named entities like 281 | &mdash; instead of decimal-encoded 282 | entites like &#8212;.

    283 | 284 | 285 | To specify an entire block of pre-formatted code, indent every line of 286 | the block by 4 spaces or 1 tab. Just like with code spans, `&`, `<`, 287 | and `>` characters will be escaped automatically. 288 | 289 | Markdown: 290 | 291 | If you want your page to validate under XHTML 1.0 Strict, 292 | you've got to put paragraph tags in your blockquotes: 293 | 294 |
    295 |

    For example.

    296 |
    297 | 298 | Output: 299 | 300 |

    If you want your page to validate under XHTML 1.0 Strict, 301 | you've got to put paragraph tags in your blockquotes:

    302 | 303 |
    <blockquote>
    304 |         <p>For example.</p>
    305 |     </blockquote>
    306 |     
    307 | -------------------------------------------------------------------------------- /deps/marked/test/original/nested_blockquotes.html: -------------------------------------------------------------------------------- 1 |
    2 |

    foo

    3 | 4 |
    5 |

    bar

    6 |
    7 | 8 |

    foo

    9 |
    10 | -------------------------------------------------------------------------------- /deps/marked/test/original/nested_blockquotes.text: -------------------------------------------------------------------------------- 1 | > foo 2 | > 3 | > > bar 4 | > 5 | > foo 6 | -------------------------------------------------------------------------------- /deps/marked/test/original/ordered_and_unordered_lists.html: -------------------------------------------------------------------------------- 1 |

    Unordered

    2 | 3 |

    Asterisks tight:

    4 | 5 |
      6 |
    • asterisk 1
    • 7 |
    • asterisk 2
    • 8 |
    • asterisk 3
    • 9 |
    10 | 11 |

    Asterisks loose:

    12 | 13 |
      14 |
    • asterisk 1

    • 15 |
    • asterisk 2

    • 16 |
    • asterisk 3

    • 17 |
    18 | 19 |
    20 | 21 |

    Pluses tight:

    22 | 23 |
      24 |
    • Plus 1
    • 25 |
    • Plus 2
    • 26 |
    • Plus 3
    • 27 |
    28 | 29 |

    Pluses loose:

    30 | 31 |
      32 |
    • Plus 1

    • 33 |
    • Plus 2

    • 34 |
    • Plus 3

    • 35 |
    36 | 37 |
    38 | 39 |

    Minuses tight:

    40 | 41 |
      42 |
    • Minus 1
    • 43 |
    • Minus 2
    • 44 |
    • Minus 3
    • 45 |
    46 | 47 |

    Minuses loose:

    48 | 49 |
      50 |
    • Minus 1

    • 51 |
    • Minus 2

    • 52 |
    • Minus 3

    • 53 |
    54 | 55 |

    Ordered

    56 | 57 |

    Tight:

    58 | 59 |
      60 |
    1. First
    2. 61 |
    3. Second
    4. 62 |
    5. Third
    6. 63 |
    64 | 65 |

    and:

    66 | 67 |
      68 |
    1. One
    2. 69 |
    3. Two
    4. 70 |
    5. Three
    6. 71 |
    72 | 73 |

    Loose using tabs:

    74 | 75 |
      76 |
    1. First

    2. 77 |
    3. Second

    4. 78 |
    5. Third

    6. 79 |
    80 | 81 |

    and using spaces:

    82 | 83 |
      84 |
    1. One

    2. 85 |
    3. Two

    4. 86 |
    5. Three

    6. 87 |
    88 | 89 |

    Multiple paragraphs:

    90 | 91 |
      92 |
    1. Item 1, graf one.

      93 | 94 |

      Item 2. graf two. The quick brown fox jumped over the lazy dog's 95 | back.

    2. 96 |
    3. Item 2.

    4. 97 |
    5. Item 3.

    6. 98 |
    99 | 100 |

    Nested

    101 | 102 |
      103 |
    • Tab 104 |
        105 |
      • Tab 106 |
          107 |
        • Tab
        • 108 |
      • 109 |
    • 110 |
    111 | 112 |

    Here's another:

    113 | 114 |
      115 |
    1. First
    2. 116 |
    3. Second: 117 |
        118 |
      • Fee
      • 119 |
      • Fie
      • 120 |
      • Foe
      • 121 |
    4. 122 |
    5. Third
    6. 123 |
    124 | 125 |

    Same thing but with paragraphs:

    126 | 127 |
      128 |
    1. First

    2. 129 |
    3. Second:

      130 | 131 |
        132 |
      • Fee
      • 133 |
      • Fie
      • 134 |
      • Foe
      • 135 |
    4. 136 |
    5. Third

    6. 137 |
    138 | 139 | 140 |

    This was an error in Markdown 1.0.1:

    141 | 142 |
      143 |
    • this

      144 | 145 |
      • sub
      146 | 147 |

      that

    • 148 |
    149 | -------------------------------------------------------------------------------- /deps/marked/test/original/ordered_and_unordered_lists.text: -------------------------------------------------------------------------------- 1 | ## Unordered 2 | 3 | Asterisks tight: 4 | 5 | * asterisk 1 6 | * asterisk 2 7 | * asterisk 3 8 | 9 | 10 | Asterisks loose: 11 | 12 | * asterisk 1 13 | 14 | * asterisk 2 15 | 16 | * asterisk 3 17 | 18 | * * * 19 | 20 | Pluses tight: 21 | 22 | + Plus 1 23 | + Plus 2 24 | + Plus 3 25 | 26 | 27 | Pluses loose: 28 | 29 | + Plus 1 30 | 31 | + Plus 2 32 | 33 | + Plus 3 34 | 35 | * * * 36 | 37 | 38 | Minuses tight: 39 | 40 | - Minus 1 41 | - Minus 2 42 | - Minus 3 43 | 44 | 45 | Minuses loose: 46 | 47 | - Minus 1 48 | 49 | - Minus 2 50 | 51 | - Minus 3 52 | 53 | 54 | ## Ordered 55 | 56 | Tight: 57 | 58 | 1. First 59 | 2. Second 60 | 3. Third 61 | 62 | and: 63 | 64 | 1. One 65 | 2. Two 66 | 3. Three 67 | 68 | 69 | Loose using tabs: 70 | 71 | 1. First 72 | 73 | 2. Second 74 | 75 | 3. Third 76 | 77 | and using spaces: 78 | 79 | 1. One 80 | 81 | 2. Two 82 | 83 | 3. Three 84 | 85 | Multiple paragraphs: 86 | 87 | 1. Item 1, graf one. 88 | 89 | Item 2. graf two. The quick brown fox jumped over the lazy dog's 90 | back. 91 | 92 | 2. Item 2. 93 | 94 | 3. Item 3. 95 | 96 | 97 | 98 | ## Nested 99 | 100 | * Tab 101 | * Tab 102 | * Tab 103 | 104 | Here's another: 105 | 106 | 1. First 107 | 2. Second: 108 | * Fee 109 | * Fie 110 | * Foe 111 | 3. Third 112 | 113 | Same thing but with paragraphs: 114 | 115 | 1. First 116 | 117 | 2. Second: 118 | * Fee 119 | * Fie 120 | * Foe 121 | 122 | 3. Third 123 | 124 | 125 | This was an error in Markdown 1.0.1: 126 | 127 | * this 128 | 129 | * sub 130 | 131 | that 132 | -------------------------------------------------------------------------------- /deps/marked/test/original/strong_and_em_together.html: -------------------------------------------------------------------------------- 1 |

    This is strong and em.

    2 | 3 |

    So is this word.

    4 | 5 |

    This is strong and em.

    6 | 7 |

    So is this word.

    8 | -------------------------------------------------------------------------------- /deps/marked/test/original/strong_and_em_together.text: -------------------------------------------------------------------------------- 1 | ***This is strong and em.*** 2 | 3 | So is ***this*** word. 4 | 5 | ___This is strong and em.___ 6 | 7 | So is ___this___ word. 8 | -------------------------------------------------------------------------------- /deps/marked/test/original/tabs.html: -------------------------------------------------------------------------------- 1 |
      2 |
    • this is a list item 3 | indented with tabs

    • 4 |
    • this is a list item 5 | indented with spaces

    • 6 |
    7 | 8 |

    Code:

    9 | 10 |
    this code block is indented by one tab
    11 | 
    12 | 13 |

    And:

    14 | 15 |
        this code block is indented by two tabs
    16 | 
    17 | 18 |

    And:

    19 | 20 |
    +   this is an example list item
    21 |     indented with tabs
    22 | 
    23 | +   this is an example list item
    24 |     indented with spaces
    25 | 
    26 | -------------------------------------------------------------------------------- /deps/marked/test/original/tabs.text: -------------------------------------------------------------------------------- 1 | + this is a list item 2 | indented with tabs 3 | 4 | + this is a list item 5 | indented with spaces 6 | 7 | Code: 8 | 9 | this code block is indented by one tab 10 | 11 | And: 12 | 13 | this code block is indented by two tabs 14 | 15 | And: 16 | 17 | + this is an example list item 18 | indented with tabs 19 | 20 | + this is an example list item 21 | indented with spaces 22 | -------------------------------------------------------------------------------- /deps/marked/test/original/tidyness.html: -------------------------------------------------------------------------------- 1 |
    2 |

    A list within a blockquote:

    3 |
      4 |
    • asterisk 1
    • 5 |
    • asterisk 2
    • 6 |
    • asterisk 3
    • 7 |
    8 |
    9 | -------------------------------------------------------------------------------- /deps/marked/test/original/tidyness.text: -------------------------------------------------------------------------------- 1 | > A list within a blockquote: 2 | > 3 | > * asterisk 1 4 | > * asterisk 2 5 | > * asterisk 3 6 | -------------------------------------------------------------------------------- /deps/marked/test/tests/amps_and_angles_encoding.html: -------------------------------------------------------------------------------- 1 |

    AT&T has an ampersand in their name.

    2 | 3 |

    AT&T is another way to write it.

    4 | 5 |

    This & that.

    6 | 7 |

    4 < 5.

    8 | 9 |

    6 > 5.

    10 | 11 |

    Here's a link with an ampersand in the URL.

    12 | 13 |

    Here's a link with an amersand in the link text: AT&T.

    14 | 15 |

    Here's an inline link.

    16 | 17 |

    Here's an inline link.

    18 | -------------------------------------------------------------------------------- /deps/marked/test/tests/amps_and_angles_encoding.text: -------------------------------------------------------------------------------- 1 | AT&T has an ampersand in their name. 2 | 3 | AT&T is another way to write it. 4 | 5 | This & that. 6 | 7 | 4 < 5. 8 | 9 | 6 > 5. 10 | 11 | Here's a [link] [1] with an ampersand in the URL. 12 | 13 | Here's a link with an amersand in the link text: [AT&T] [2]. 14 | 15 | Here's an inline [link](/script?foo=1&bar=2). 16 | 17 | Here's an inline [link](). 18 | 19 | 20 | [1]: http://example.com/?foo=1&bar=2 21 | [2]: http://att.com/ "AT&T" 22 | -------------------------------------------------------------------------------- /deps/marked/test/tests/auto_links.html: -------------------------------------------------------------------------------- 1 |

    Link: http://example.com/.

    2 | 3 |

    With an ampersand: http://example.com/?foo=1&bar=2

    4 | 5 | 10 | 11 |
    12 |

    Blockquoted: http://example.com/

    13 |
    14 | 15 |

    Auto-links should not occur here: <http://example.com/>

    16 | 17 |
    or here: <http://example.com/>
    18 | 
    19 | -------------------------------------------------------------------------------- /deps/marked/test/tests/auto_links.text: -------------------------------------------------------------------------------- 1 | Link: . 2 | 3 | With an ampersand: 4 | 5 | * In a list? 6 | * 7 | * It should. 8 | 9 | > Blockquoted: 10 | 11 | Auto-links should not occur here: `` 12 | 13 | or here: 14 | -------------------------------------------------------------------------------- /deps/marked/test/tests/backslash_escapes.html: -------------------------------------------------------------------------------- 1 |

    These should all get escaped:

    2 | 3 |

    Backslash: \

    4 | 5 |

    Backtick: `

    6 | 7 |

    Asterisk: *

    8 | 9 |

    Underscore: _

    10 | 11 |

    Left brace: {

    12 | 13 |

    Right brace: }

    14 | 15 |

    Left bracket: [

    16 | 17 |

    Right bracket: ]

    18 | 19 |

    Left paren: (

    20 | 21 |

    Right paren: )

    22 | 23 |

    Greater-than: >

    24 | 25 |

    Hash: #

    26 | 27 |

    Period: .

    28 | 29 |

    Bang: !

    30 | 31 |

    Plus: +

    32 | 33 |

    Minus: -

    34 | 35 |

    These should not, because they occur within a code block:

    36 | 37 |
    Backslash: \\
     38 | 
     39 | Backtick: \`
     40 | 
     41 | Asterisk: \*
     42 | 
     43 | Underscore: \_
     44 | 
     45 | Left brace: \{
     46 | 
     47 | Right brace: \}
     48 | 
     49 | Left bracket: \[
     50 | 
     51 | Right bracket: \]
     52 | 
     53 | Left paren: \(
     54 | 
     55 | Right paren: \)
     56 | 
     57 | Greater-than: \>
     58 | 
     59 | Hash: \#
     60 | 
     61 | Period: \.
     62 | 
     63 | Bang: \!
     64 | 
     65 | Plus: \+
     66 | 
     67 | Minus: \-
     68 | 
    69 | 70 |

    Nor should these, which occur in code spans:

    71 | 72 |

    Backslash: \\

    73 | 74 |

    Backtick: \`

    75 | 76 |

    Asterisk: \*

    77 | 78 |

    Underscore: \_

    79 | 80 |

    Left brace: \{

    81 | 82 |

    Right brace: \}

    83 | 84 |

    Left bracket: \[

    85 | 86 |

    Right bracket: \]

    87 | 88 |

    Left paren: \(

    89 | 90 |

    Right paren: \)

    91 | 92 |

    Greater-than: \>

    93 | 94 |

    Hash: \#

    95 | 96 |

    Period: \.

    97 | 98 |

    Bang: \!

    99 | 100 |

    Plus: \+

    101 | 102 |

    Minus: \-

    103 | 104 | 105 |

    These should get escaped, even though they're matching pairs for 106 | other Markdown constructs:

    107 | 108 |

    *asterisks*

    109 | 110 |

    _underscores_

    111 | 112 |

    `backticks`

    113 | 114 |

    This is a code span with a literal backslash-backtick sequence: \`

    115 | 116 |

    This is a tag with unescaped backticks bar.

    117 | 118 |

    This is a tag with backslashes bar.

    119 | -------------------------------------------------------------------------------- /deps/marked/test/tests/backslash_escapes.text: -------------------------------------------------------------------------------- 1 | These should all get escaped: 2 | 3 | Backslash: \\ 4 | 5 | Backtick: \` 6 | 7 | Asterisk: \* 8 | 9 | Underscore: \_ 10 | 11 | Left brace: \{ 12 | 13 | Right brace: \} 14 | 15 | Left bracket: \[ 16 | 17 | Right bracket: \] 18 | 19 | Left paren: \( 20 | 21 | Right paren: \) 22 | 23 | Greater-than: \> 24 | 25 | Hash: \# 26 | 27 | Period: \. 28 | 29 | Bang: \! 30 | 31 | Plus: \+ 32 | 33 | Minus: \- 34 | 35 | 36 | 37 | These should not, because they occur within a code block: 38 | 39 | Backslash: \\ 40 | 41 | Backtick: \` 42 | 43 | Asterisk: \* 44 | 45 | Underscore: \_ 46 | 47 | Left brace: \{ 48 | 49 | Right brace: \} 50 | 51 | Left bracket: \[ 52 | 53 | Right bracket: \] 54 | 55 | Left paren: \( 56 | 57 | Right paren: \) 58 | 59 | Greater-than: \> 60 | 61 | Hash: \# 62 | 63 | Period: \. 64 | 65 | Bang: \! 66 | 67 | Plus: \+ 68 | 69 | Minus: \- 70 | 71 | 72 | Nor should these, which occur in code spans: 73 | 74 | Backslash: `\\` 75 | 76 | Backtick: `` \` `` 77 | 78 | Asterisk: `\*` 79 | 80 | Underscore: `\_` 81 | 82 | Left brace: `\{` 83 | 84 | Right brace: `\}` 85 | 86 | Left bracket: `\[` 87 | 88 | Right bracket: `\]` 89 | 90 | Left paren: `\(` 91 | 92 | Right paren: `\)` 93 | 94 | Greater-than: `\>` 95 | 96 | Hash: `\#` 97 | 98 | Period: `\.` 99 | 100 | Bang: `\!` 101 | 102 | Plus: `\+` 103 | 104 | Minus: `\-` 105 | 106 | 107 | These should get escaped, even though they're matching pairs for 108 | other Markdown constructs: 109 | 110 | \*asterisks\* 111 | 112 | \_underscores\_ 113 | 114 | \`backticks\` 115 | 116 | This is a code span with a literal backslash-backtick sequence: `` \` `` 117 | 118 | This is a tag with unescaped backticks bar. 119 | 120 | This is a tag with backslashes bar. 121 | -------------------------------------------------------------------------------- /deps/marked/test/tests/blockquote_list_item.html: -------------------------------------------------------------------------------- 1 |

    This fails in markdown.pl and upskirt:

    2 | 3 |
    • hello

      world

    4 | -------------------------------------------------------------------------------- /deps/marked/test/tests/blockquote_list_item.text: -------------------------------------------------------------------------------- 1 | This fails in markdown.pl and upskirt: 2 | 3 | * hello 4 | > world 5 | -------------------------------------------------------------------------------- /deps/marked/test/tests/blockquotes_with_code_blocks.html: -------------------------------------------------------------------------------- 1 |
    2 |

    Example:

    3 | 4 |
    sub status {
     5 |     print "working";
     6 | }
     7 | 
    8 | 9 |

    Or:

    10 | 11 |
    sub status {
    12 |     return "working";
    13 | }
    14 | 
    15 |
    16 | -------------------------------------------------------------------------------- /deps/marked/test/tests/blockquotes_with_code_blocks.text: -------------------------------------------------------------------------------- 1 | > Example: 2 | > 3 | > sub status { 4 | > print "working"; 5 | > } 6 | > 7 | > Or: 8 | > 9 | > sub status { 10 | > return "working"; 11 | > } 12 | -------------------------------------------------------------------------------- /deps/marked/test/tests/case_insensitive_refs.html: -------------------------------------------------------------------------------- 1 |

    hi

    2 | -------------------------------------------------------------------------------- /deps/marked/test/tests/case_insensitive_refs.text: -------------------------------------------------------------------------------- 1 | [hi] 2 | 3 | [HI]: /url 4 | -------------------------------------------------------------------------------- /deps/marked/test/tests/code_blocks.html: -------------------------------------------------------------------------------- 1 |
    code block on the first line
     2 | 
    3 | 4 |

    Regular text.

    5 | 6 |
    code block indented by spaces
     7 | 
    8 | 9 |

    Regular text.

    10 | 11 |
    the lines in this block  
    12 | all contain trailing spaces  
    13 | 
    14 | 15 |

    Regular Text.

    16 | 17 |
    code block on the last line
    18 | 
    19 | -------------------------------------------------------------------------------- /deps/marked/test/tests/code_blocks.text: -------------------------------------------------------------------------------- 1 | code block on the first line 2 | 3 | Regular text. 4 | 5 | code block indented by spaces 6 | 7 | Regular text. 8 | 9 | the lines in this block 10 | all contain trailing spaces 11 | 12 | Regular Text. 13 | 14 | code block on the last line 15 | -------------------------------------------------------------------------------- /deps/marked/test/tests/code_spans.html: -------------------------------------------------------------------------------- 1 |

    <test a=" content of attribute ">

    2 | 3 |

    Fix for backticks within HTML tag: like this

    4 | 5 |

    Here's how you put `backticks` in a code span.

    6 | 7 | -------------------------------------------------------------------------------- /deps/marked/test/tests/code_spans.text: -------------------------------------------------------------------------------- 1 | `` 2 | 3 | Fix for backticks within HTML tag: like this 4 | 5 | Here's how you put `` `backticks` `` in a code span. 6 | 7 | -------------------------------------------------------------------------------- /deps/marked/test/tests/escaped_angles.html: -------------------------------------------------------------------------------- 1 |

    >

    2 | -------------------------------------------------------------------------------- /deps/marked/test/tests/escaped_angles.text: -------------------------------------------------------------------------------- 1 | \> 2 | -------------------------------------------------------------------------------- /deps/marked/test/tests/gfm_break.html: -------------------------------------------------------------------------------- 1 |

    Look at the
    pretty line
    breaks.

    2 | -------------------------------------------------------------------------------- /deps/marked/test/tests/gfm_break.text: -------------------------------------------------------------------------------- 1 | Look at the 2 | pretty line 3 | breaks. 4 | -------------------------------------------------------------------------------- /deps/marked/test/tests/gfm_code.html: -------------------------------------------------------------------------------- 1 |
    var a = 'hello';
    2 | console.log(a + ' world');
    3 | 
    4 | -------------------------------------------------------------------------------- /deps/marked/test/tests/gfm_code.text: -------------------------------------------------------------------------------- 1 | ``` js 2 | var a = 'hello'; 3 | console.log(a + ' world'); 4 | ``` 5 | -------------------------------------------------------------------------------- /deps/marked/test/tests/gfm_em.html: -------------------------------------------------------------------------------- 1 |

    These words should_not_be_emphasized.

    2 | -------------------------------------------------------------------------------- /deps/marked/test/tests/gfm_em.text: -------------------------------------------------------------------------------- 1 | These words should_not_be_emphasized. 2 | -------------------------------------------------------------------------------- /deps/marked/test/tests/gfm_links.html: -------------------------------------------------------------------------------- 1 |

    This should be a link: 2 | http://example.com/hello-world.

    3 | -------------------------------------------------------------------------------- /deps/marked/test/tests/gfm_links.text: -------------------------------------------------------------------------------- 1 | This should be a link: http://example.com/hello-world. 2 | -------------------------------------------------------------------------------- /deps/marked/test/tests/hard_wrapped_paragraphs_with_list_like_lines.html: -------------------------------------------------------------------------------- 1 |

    In Markdown 1.0.0 and earlier. Version 2 | 8. This line turns into a list item. 3 | Because a hard-wrapped line in the 4 | middle of a paragraph looked like a 5 | list item.

    6 | 7 |

    Here's one with a bullet. 8 | * criminey.

    9 | -------------------------------------------------------------------------------- /deps/marked/test/tests/hard_wrapped_paragraphs_with_list_like_lines.text: -------------------------------------------------------------------------------- 1 | In Markdown 1.0.0 and earlier. Version 2 | 8. This line turns into a list item. 3 | Because a hard-wrapped line in the 4 | middle of a paragraph looked like a 5 | list item. 6 | 7 | Here's one with a bullet. 8 | * criminey. 9 | -------------------------------------------------------------------------------- /deps/marked/test/tests/horizontal_rules.html: -------------------------------------------------------------------------------- 1 |

    Dashes:

    2 | 3 |
    4 | 5 |
    6 | 7 |
    8 | 9 |
    10 | 11 |
    ---
    12 | 
    13 | 14 |
    15 | 16 |
    17 | 18 |
    19 | 20 |
    21 | 22 |
    - - -
    23 | 
    24 | 25 |

    Asterisks:

    26 | 27 |
    28 | 29 |
    30 | 31 |
    32 | 33 |
    34 | 35 |
    ***
    36 | 
    37 | 38 |
    39 | 40 |
    41 | 42 |
    43 | 44 |
    45 | 46 |
    * * *
    47 | 
    48 | 49 |

    Underscores:

    50 | 51 |
    52 | 53 |
    54 | 55 |
    56 | 57 |
    58 | 59 |
    ___
    60 | 
    61 | 62 |
    63 | 64 |
    65 | 66 |
    67 | 68 |
    69 | 70 |
    _ _ _
    71 | 
    72 | -------------------------------------------------------------------------------- /deps/marked/test/tests/horizontal_rules.text: -------------------------------------------------------------------------------- 1 | Dashes: 2 | 3 | --- 4 | 5 | --- 6 | 7 | --- 8 | 9 | --- 10 | 11 | --- 12 | 13 | - - - 14 | 15 | - - - 16 | 17 | - - - 18 | 19 | - - - 20 | 21 | - - - 22 | 23 | 24 | Asterisks: 25 | 26 | *** 27 | 28 | *** 29 | 30 | *** 31 | 32 | *** 33 | 34 | *** 35 | 36 | * * * 37 | 38 | * * * 39 | 40 | * * * 41 | 42 | * * * 43 | 44 | * * * 45 | 46 | 47 | Underscores: 48 | 49 | ___ 50 | 51 | ___ 52 | 53 | ___ 54 | 55 | ___ 56 | 57 | ___ 58 | 59 | _ _ _ 60 | 61 | _ _ _ 62 | 63 | _ _ _ 64 | 65 | _ _ _ 66 | 67 | _ _ _ 68 | -------------------------------------------------------------------------------- /deps/marked/test/tests/hr_list_break.html: -------------------------------------------------------------------------------- 1 |
      2 |
    • hello 3 | world
    • 4 |
    • how 5 | are
    • 6 |
    7 | 8 |
    9 | 10 |

    you today?

    11 | -------------------------------------------------------------------------------- /deps/marked/test/tests/hr_list_break.text: -------------------------------------------------------------------------------- 1 | * hello 2 | world 3 | * how 4 | are 5 | * * * 6 | you today? 7 | -------------------------------------------------------------------------------- /deps/marked/test/tests/inline_html_advanced.html: -------------------------------------------------------------------------------- 1 |

    Simple block on one line:

    2 | 3 |
    foo
    4 | 5 |

    And nested without indentation:

    6 | 7 |
    8 |
    9 |
    10 | foo 11 |
    12 |
    13 |
    14 |
    bar
    15 |
    16 | -------------------------------------------------------------------------------- /deps/marked/test/tests/inline_html_advanced.text: -------------------------------------------------------------------------------- 1 | Simple block on one line: 2 | 3 |
    foo
    4 | 5 | And nested without indentation: 6 | 7 |
    8 |
    9 |
    10 | foo 11 |
    12 |
    13 |
    14 |
    bar
    15 |
    16 | -------------------------------------------------------------------------------- /deps/marked/test/tests/inline_html_comments.html: -------------------------------------------------------------------------------- 1 |

    Paragraph one.

    2 | 3 | 4 | 5 | 8 | 9 |

    Paragraph two.

    10 | 11 | 12 | 13 |

    The end.

    14 | -------------------------------------------------------------------------------- /deps/marked/test/tests/inline_html_comments.text: -------------------------------------------------------------------------------- 1 | Paragraph one. 2 | 3 | 4 | 5 | 8 | 9 | Paragraph two. 10 | 11 | 12 | 13 | The end. 14 | -------------------------------------------------------------------------------- /deps/marked/test/tests/inline_html_simple.html: -------------------------------------------------------------------------------- 1 |

    Here's a simple block:

    2 | 3 |
    4 | foo 5 |
    6 | 7 |

    This should be a code block, though:

    8 | 9 |
    <div>
    10 |     foo
    11 | </div>
    12 | 
    13 | 14 |

    As should this:

    15 | 16 |
    <div>foo</div>
    17 | 
    18 | 19 |

    Now, nested:

    20 | 21 |
    22 |
    23 |
    24 | foo 25 |
    26 |
    27 |
    28 | 29 |

    This should just be an HTML comment:

    30 | 31 | 32 | 33 |

    Multiline:

    34 | 35 | 39 | 40 |

    Code block:

    41 | 42 |
    <!-- Comment -->
    43 | 
    44 | 45 |

    Just plain comment, with trailing spaces on the line:

    46 | 47 | 48 | 49 |

    Code:

    50 | 51 |
    <hr>
    52 | 
    53 | 54 |

    Hr's:

    55 | 56 |
    57 | 58 |
    59 | 60 |
    61 | 62 |
    63 | 64 |
    65 | 66 |
    67 | 68 |
    69 | 70 |
    71 | 72 |
    73 | -------------------------------------------------------------------------------- /deps/marked/test/tests/inline_html_simple.text: -------------------------------------------------------------------------------- 1 | Here's a simple block: 2 | 3 |
    4 | foo 5 |
    6 | 7 | This should be a code block, though: 8 | 9 |
    10 | foo 11 |
    12 | 13 | As should this: 14 | 15 |
    foo
    16 | 17 | Now, nested: 18 | 19 |
    20 |
    21 |
    22 | foo 23 |
    24 |
    25 |
    26 | 27 | This should just be an HTML comment: 28 | 29 | 30 | 31 | Multiline: 32 | 33 | 37 | 38 | Code block: 39 | 40 | 41 | 42 | Just plain comment, with trailing spaces on the line: 43 | 44 | 45 | 46 | Code: 47 | 48 |
    49 | 50 | Hr's: 51 | 52 |
    53 | 54 |
    55 | 56 |
    57 | 58 |
    59 | 60 |
    61 | 62 |
    63 | 64 |
    65 | 66 |
    67 | 68 |
    69 | 70 | -------------------------------------------------------------------------------- /deps/marked/test/tests/lazy_blockquotes.html: -------------------------------------------------------------------------------- 1 |
    2 |

    hi there 3 | bud

    4 |
    5 | -------------------------------------------------------------------------------- /deps/marked/test/tests/lazy_blockquotes.text: -------------------------------------------------------------------------------- 1 | > hi there 2 | bud 3 | -------------------------------------------------------------------------------- /deps/marked/test/tests/links_inline_style.html: -------------------------------------------------------------------------------- 1 |

    Just a URL.

    2 | 3 |

    URL and title.

    4 | 5 |

    URL and title.

    6 | 7 |

    URL and title.

    8 | 9 |

    URL and title.

    10 | 11 |

    Empty.

    12 | -------------------------------------------------------------------------------- /deps/marked/test/tests/links_inline_style.text: -------------------------------------------------------------------------------- 1 | Just a [URL](/url/). 2 | 3 | [URL and title](/url/ "title"). 4 | 5 | [URL and title](/url/ "title preceded by two spaces"). 6 | 7 | [URL and title](/url/ "title preceded by a tab"). 8 | 9 | [URL and title](/url/ "title has spaces afterward" ). 10 | 11 | 12 | [Empty](). 13 | -------------------------------------------------------------------------------- /deps/marked/test/tests/links_reference_style.html: -------------------------------------------------------------------------------- 1 |

    Foo bar.

    2 | 3 |

    Foo bar.

    4 | 5 |

    Foo bar.

    6 | 7 |

    With embedded [brackets].

    8 | 9 |

    Indented once.

    10 | 11 |

    Indented twice.

    12 | 13 |

    Indented thrice.

    14 | 15 |

    Indented [four][] times.

    16 | 17 |
    [four]: /url
    18 | 
    19 | 20 |
    21 | 22 |

    this should work

    23 | 24 |

    So should this.

    25 | 26 |

    And this.

    27 | 28 |

    And this.

    29 | 30 |

    And this.

    31 | 32 |

    But not [that] [].

    33 | 34 |

    Nor [that][].

    35 | 36 |

    Nor [that].

    37 | 38 |

    [Something in brackets like this should work]

    39 | 40 |

    [Same with this.]

    41 | 42 |

    In this case, this points to something else.

    43 | 44 |

    Backslashing should suppress [this] and [this].

    45 | 46 |
    47 | 48 |

    Here's one where the link 49 | breaks across lines.

    50 | 51 |

    Here's another where the link 52 | breaks across lines, but with a line-ending space.

    53 | -------------------------------------------------------------------------------- /deps/marked/test/tests/links_reference_style.text: -------------------------------------------------------------------------------- 1 | Foo [bar] [1]. 2 | 3 | Foo [bar][1]. 4 | 5 | Foo [bar] 6 | [1]. 7 | 8 | [1]: /url/ "Title" 9 | 10 | 11 | With [embedded [brackets]] [b]. 12 | 13 | 14 | Indented [once][]. 15 | 16 | Indented [twice][]. 17 | 18 | Indented [thrice][]. 19 | 20 | Indented [four][] times. 21 | 22 | [once]: /url 23 | 24 | [twice]: /url 25 | 26 | [thrice]: /url 27 | 28 | [four]: /url 29 | 30 | 31 | [b]: /url/ 32 | 33 | * * * 34 | 35 | [this] [this] should work 36 | 37 | So should [this][this]. 38 | 39 | And [this] []. 40 | 41 | And [this][]. 42 | 43 | And [this]. 44 | 45 | But not [that] []. 46 | 47 | Nor [that][]. 48 | 49 | Nor [that]. 50 | 51 | [Something in brackets like [this][] should work] 52 | 53 | [Same with [this].] 54 | 55 | In this case, [this](/somethingelse/) points to something else. 56 | 57 | Backslashing should suppress \[this] and [this\]. 58 | 59 | [this]: foo 60 | 61 | 62 | * * * 63 | 64 | Here's one where the [link 65 | breaks] across lines. 66 | 67 | Here's another where the [link 68 | breaks] across lines, but with a line-ending space. 69 | 70 | 71 | [link breaks]: /url/ 72 | -------------------------------------------------------------------------------- /deps/marked/test/tests/links_shortcut_references.html: -------------------------------------------------------------------------------- 1 |

    This is the simple case.

    2 | 3 |

    This one has a line 4 | break.

    5 | 6 |

    This one has a line 7 | break with a line-ending space.

    8 | 9 |

    this and the other

    10 | -------------------------------------------------------------------------------- /deps/marked/test/tests/links_shortcut_references.text: -------------------------------------------------------------------------------- 1 | This is the [simple case]. 2 | 3 | [simple case]: /simple 4 | 5 | 6 | 7 | This one has a [line 8 | break]. 9 | 10 | This one has a [line 11 | break] with a line-ending space. 12 | 13 | [line break]: /foo 14 | 15 | 16 | [this] [that] and the [other] 17 | 18 | [this]: /this 19 | [that]: /that 20 | [other]: /other 21 | -------------------------------------------------------------------------------- /deps/marked/test/tests/list_item_text.html: -------------------------------------------------------------------------------- 1 |
    • item1

      • item2

      text

    2 | -------------------------------------------------------------------------------- /deps/marked/test/tests/list_item_text.text: -------------------------------------------------------------------------------- 1 | * item1 2 | 3 | * item2 4 | 5 | text 6 | -------------------------------------------------------------------------------- /deps/marked/test/tests/literal_quotes_in_titles.html: -------------------------------------------------------------------------------- 1 |

    Foo bar.

    2 | 3 |

    Foo bar.

    4 | -------------------------------------------------------------------------------- /deps/marked/test/tests/literal_quotes_in_titles.text: -------------------------------------------------------------------------------- 1 | Foo [bar][]. 2 | 3 | Foo [bar](/url/ "Title with "quotes" inside"). 4 | 5 | 6 | [bar]: /url/ "Title with "quotes" inside" 7 | 8 | -------------------------------------------------------------------------------- /deps/marked/test/tests/loose_lists.html: -------------------------------------------------------------------------------- 1 |
      2 |
    • hello 3 | world

      4 | 5 |

      how 6 | are

    • 7 |
    • you
    • 8 |
    9 | 10 | 11 | 12 |

    better behavior:

    13 | 14 |
    • hello

      • world 15 | how

        are 16 | you

      • today

    • hi
    17 | 18 | 19 | 20 |
      21 |
    • hello

    • 22 |
    • world

    • 23 |
    • hi
    • 24 |
    25 | 26 | 27 | 28 |
      29 |
    • hello
    • 30 |
    • world

    • 31 |
    • hi

    • 32 |
    33 | 34 | 35 | 36 |
      37 |
    • hello
    • 38 |
    • world

      39 | 40 |

      how

    • 41 |
    • hi
    • 42 |
    43 | 44 | 45 | 46 |
      47 |
    • hello
    • 48 |
    • world
    • 49 |
    • how

      50 | 51 |

      are

    • 52 |
    53 | 54 | 55 | 56 |
      57 |
    • hello
    • 58 |
    • world

    • 59 |
    • how

      60 | 61 |

      are

    • 62 |
    63 | -------------------------------------------------------------------------------- /deps/marked/test/tests/loose_lists.text: -------------------------------------------------------------------------------- 1 | * hello 2 | world 3 | 4 | how 5 | are 6 | * you 7 | 8 | 9 | 10 | better behavior: 11 | 12 | * hello 13 | * world 14 | how 15 | 16 | are 17 | you 18 | 19 | * today 20 | * hi 21 | 22 | 23 | 24 | * hello 25 | 26 | * world 27 | * hi 28 | 29 | 30 | 31 | * hello 32 | * world 33 | 34 | * hi 35 | 36 | 37 | 38 | * hello 39 | * world 40 | 41 | how 42 | * hi 43 | 44 | 45 | 46 | * hello 47 | * world 48 | * how 49 | 50 | are 51 | 52 | 53 | 54 | * hello 55 | * world 56 | 57 | * how 58 | 59 | are 60 | -------------------------------------------------------------------------------- /deps/marked/test/tests/main.html: -------------------------------------------------------------------------------- 1 |

    A heading

    Just a note, I've found that I can't test my markdown parser vs others. For example, both markdown.js and showdown code blocks in lists wrong. They're also completely inconsistent with regards to paragraphs in list items.

    A link. Not anymore.

    • List Item 1

    • List Item 2

      • New List Item 1 Hi, this is a list item.
      • New List Item 2 Another item
        Code goes here.
        3 | Lots of it...
      • New List Item 3 The last item
    • List Item 3 The final item.

    • List Item 4 The real final item.

    Paragraph.

    • bq Item 1
    • bq Item 2
      • New bq Item 1
      • New bq Item 2 Text here

    Another blockquote! I really need to get more creative with mockup text.. markdown.js breaks here again

    Another Heading

    Hello world. Here is a link. And an image alt.

    Code goes here.
    4 | Lots of it...
    5 | -------------------------------------------------------------------------------- /deps/marked/test/tests/main.text: -------------------------------------------------------------------------------- 1 | [test]: http://google.com/ "Google" 2 | 3 | # A heading 4 | 5 | Just a note, I've found that I can't test my markdown parser vs others. 6 | For example, both markdown.js and showdown code blocks in lists wrong. They're 7 | also completely [inconsistent][test] with regards to paragraphs in list items. 8 | 9 | A link. Not anymore. 10 | 11 | 13 | 14 | * List Item 1 15 | 16 | * List Item 2 17 | * New List Item 1 18 | Hi, this is a list item. 19 | * New List Item 2 20 | Another item 21 | Code goes here. 22 | Lots of it... 23 | * New List Item 3 24 | The last item 25 | 26 | * List Item 3 27 | The final item. 28 | 29 | * List Item 4 30 | The real final item. 31 | 32 | Paragraph. 33 | 34 | > * bq Item 1 35 | > * bq Item 2 36 | > * New bq Item 1 37 | > * New bq Item 2 38 | > Text here 39 | 40 | * * * 41 | 42 | > Another blockquote! 43 | > I really need to get 44 | > more creative with 45 | > mockup text.. 46 | > markdown.js breaks here again 47 | 48 | Another Heading 49 | ------------- 50 | 51 | Hello *world*. Here is a [link](//hello). 52 | And an image ![alt](src). 53 | 54 | Code goes here. 55 | Lots of it... 56 | -------------------------------------------------------------------------------- /deps/marked/test/tests/markdown_documentation_basics.html: -------------------------------------------------------------------------------- 1 |

    Markdown: Basics

    2 | 3 | 10 | 11 |

    Getting the Gist of Markdown's Formatting Syntax

    12 | 13 |

    This page offers a brief overview of what it's like to use Markdown. 14 | The syntax page provides complete, detailed documentation for 15 | every feature, but Markdown should be very easy to pick up simply by 16 | looking at a few examples of it in action. The examples on this page 17 | are written in a before/after style, showing example syntax and the 18 | HTML output produced by Markdown.

    19 | 20 |

    It's also helpful to simply try Markdown out; the Dingus is a 21 | web application that allows you type your own Markdown-formatted text 22 | and translate it to XHTML.

    23 | 24 |

    Note: This document is itself written using Markdown; you 25 | can see the source for it by adding '.text' to the URL.

    26 | 27 |

    Paragraphs, Headers, Blockquotes

    28 | 29 |

    A paragraph is simply one or more consecutive lines of text, separated 30 | by one or more blank lines. (A blank line is any line that looks like a 31 | blank line -- a line containing nothing spaces or tabs is considered 32 | blank.) Normal paragraphs should not be intended with spaces or tabs.

    33 | 34 |

    Markdown offers two styles of headers: Setext and atx. 35 | Setext-style headers for <h1> and <h2> are created by 36 | "underlining" with equal signs (=) and hyphens (-), respectively. 37 | To create an atx-style header, you put 1-6 hash marks (#) at the 38 | beginning of the line -- the number of hashes equals the resulting 39 | HTML header level.

    40 | 41 |

    Blockquotes are indicated using email-style '>' angle brackets.

    42 | 43 |

    Markdown:

    44 | 45 |
    A First Level Header
     46 | ====================
     47 | 
     48 | A Second Level Header
     49 | ---------------------
     50 | 
     51 | Now is the time for all good men to come to
     52 | the aid of their country. This is just a
     53 | regular paragraph.
     54 | 
     55 | The quick brown fox jumped over the lazy
     56 | dog's back.
     57 | 
     58 | ### Header 3
     59 | 
     60 | > This is a blockquote.
     61 | > 
     62 | > This is the second paragraph in the blockquote.
     63 | >
     64 | > ## This is an H2 in a blockquote
     65 | 
    66 | 67 |

    Output:

    68 | 69 |
    <h1>A First Level Header</h1>
     70 | 
     71 | <h2>A Second Level Header</h2>
     72 | 
     73 | <p>Now is the time for all good men to come to
     74 | the aid of their country. This is just a
     75 | regular paragraph.</p>
     76 | 
     77 | <p>The quick brown fox jumped over the lazy
     78 | dog's back.</p>
     79 | 
     80 | <h3>Header 3</h3>
     81 | 
     82 | <blockquote>
     83 |     <p>This is a blockquote.</p>
     84 | 
     85 |     <p>This is the second paragraph in the blockquote.</p>
     86 | 
     87 |     <h2>This is an H2 in a blockquote</h2>
     88 | </blockquote>
     89 | 
    90 | 91 |

    Phrase Emphasis

    92 | 93 |

    Markdown uses asterisks and underscores to indicate spans of emphasis.

    94 | 95 |

    Markdown:

    96 | 97 |
    Some of these words *are emphasized*.
     98 | Some of these words _are emphasized also_.
     99 | 
    100 | Use two asterisks for **strong emphasis**.
    101 | Or, if you prefer, __use two underscores instead__.
    102 | 
    103 | 104 |

    Output:

    105 | 106 |
    <p>Some of these words <em>are emphasized</em>.
    107 | Some of these words <em>are emphasized also</em>.</p>
    108 | 
    109 | <p>Use two asterisks for <strong>strong emphasis</strong>.
    110 | Or, if you prefer, <strong>use two underscores instead</strong>.</p>
    111 | 
    112 | 113 |

    Lists

    114 | 115 |

    Unordered (bulleted) lists use asterisks, pluses, and hyphens (*, 116 | +, and -) as list markers. These three markers are 117 | interchangable; this:

    118 | 119 |
    *   Candy.
    120 | *   Gum.
    121 | *   Booze.
    122 | 
    123 | 124 |

    this:

    125 | 126 |
    +   Candy.
    127 | +   Gum.
    128 | +   Booze.
    129 | 
    130 | 131 |

    and this:

    132 | 133 |
    -   Candy.
    134 | -   Gum.
    135 | -   Booze.
    136 | 
    137 | 138 |

    all produce the same output:

    139 | 140 |
    <ul>
    141 | <li>Candy.</li>
    142 | <li>Gum.</li>
    143 | <li>Booze.</li>
    144 | </ul>
    145 | 
    146 | 147 |

    Ordered (numbered) lists use regular numbers, followed by periods, as 148 | list markers:

    149 | 150 |
    1.  Red
    151 | 2.  Green
    152 | 3.  Blue
    153 | 
    154 | 155 |

    Output:

    156 | 157 |
    <ol>
    158 | <li>Red</li>
    159 | <li>Green</li>
    160 | <li>Blue</li>
    161 | </ol>
    162 | 
    163 | 164 |

    If you put blank lines between items, you'll get <p> tags for the 165 | list item text. You can create multi-paragraph list items by indenting 166 | the paragraphs by 4 spaces or 1 tab:

    167 | 168 |
    *   A list item.
    169 | 
    170 |     With multiple paragraphs.
    171 | 
    172 | *   Another item in the list.
    173 | 
    174 | 175 |

    Output:

    176 | 177 |
    <ul>
    178 | <li><p>A list item.</p>
    179 | <p>With multiple paragraphs.</p></li>
    180 | <li><p>Another item in the list.</p></li>
    181 | </ul>
    182 | 
    183 | 184 |

    Links

    185 | 186 |

    Markdown supports two styles for creating links: inline and 187 | reference. With both styles, you use square brackets to delimit the 188 | text you want to turn into a link.

    189 | 190 |

    Inline-style links use parentheses immediately after the link text. 191 | For example:

    192 | 193 |
    This is an [example link](http://example.com/).
    194 | 
    195 | 196 |

    Output:

    197 | 198 |
    <p>This is an <a href="http://example.com/">
    199 | example link</a>.</p>
    200 | 
    201 | 202 |

    Optionally, you may include a title attribute in the parentheses:

    203 | 204 |
    This is an [example link](http://example.com/ "With a Title").
    205 | 
    206 | 207 |

    Output:

    208 | 209 |
    <p>This is an <a href="http://example.com/" title="With a Title">
    210 | example link</a>.</p>
    211 | 
    212 | 213 |

    Reference-style links allow you to refer to your links by names, which 214 | you define elsewhere in your document:

    215 | 216 |
    I get 10 times more traffic from [Google][1] than from
    217 | [Yahoo][2] or [MSN][3].
    218 | 
    219 | [1]: http://google.com/        "Google"
    220 | [2]: http://search.yahoo.com/  "Yahoo Search"
    221 | [3]: http://search.msn.com/    "MSN Search"
    222 | 
    223 | 224 |

    Output:

    225 | 226 |
    <p>I get 10 times more traffic from <a href="http://google.com/"
    227 | title="Google">Google</a> than from <a href="http://search.yahoo.com/"
    228 | title="Yahoo Search">Yahoo</a> or <a href="http://search.msn.com/"
    229 | title="MSN Search">MSN</a>.</p>
    230 | 
    231 | 232 |

    The title attribute is optional. Link names may contain letters, 233 | numbers and spaces, but are not case sensitive:

    234 | 235 |
    I start my morning with a cup of coffee and
    236 | [The New York Times][NY Times].
    237 | 
    238 | [ny times]: http://www.nytimes.com/
    239 | 
    240 | 241 |

    Output:

    242 | 243 |
    <p>I start my morning with a cup of coffee and
    244 | <a href="http://www.nytimes.com/">The New York Times</a>.</p>
    245 | 
    246 | 247 |

    Images

    248 | 249 |

    Image syntax is very much like link syntax.

    250 | 251 |

    Inline (titles are optional):

    252 | 253 |
    ![alt text](/path/to/img.jpg "Title")
    254 | 
    255 | 256 |

    Reference-style:

    257 | 258 |
    ![alt text][id]
    259 | 
    260 | [id]: /path/to/img.jpg "Title"
    261 | 
    262 | 263 |

    Both of the above examples produce the same output:

    264 | 265 |
    <img src="/path/to/img.jpg" alt="alt text" title="Title" />
    266 | 
    267 | 268 |

    Code

    269 | 270 |

    In a regular paragraph, you can create code span by wrapping text in 271 | backtick quotes. Any ampersands (&) and angle brackets (< or 272 | >) will automatically be translated into HTML entities. This makes 273 | it easy to use Markdown to write about HTML example code:

    274 | 275 |
    I strongly recommend against using any `<blink>` tags.
    276 | 
    277 | I wish SmartyPants used named entities like `&mdash;`
    278 | instead of decimal-encoded entites like `&#8212;`.
    279 | 
    280 | 281 |

    Output:

    282 | 283 |
    <p>I strongly recommend against using any
    284 | <code>&lt;blink&gt;</code> tags.</p>
    285 | 
    286 | <p>I wish SmartyPants used named entities like
    287 | <code>&amp;mdash;</code> instead of decimal-encoded
    288 | entites like <code>&amp;#8212;</code>.</p>
    289 | 
    290 | 291 |

    To specify an entire block of pre-formatted code, indent every line of 292 | the block by 4 spaces or 1 tab. Just like with code spans, &, <, 293 | and > characters will be escaped automatically.

    294 | 295 |

    Markdown:

    296 | 297 |
    If you want your page to validate under XHTML 1.0 Strict,
    298 | you've got to put paragraph tags in your blockquotes:
    299 | 
    300 |     <blockquote>
    301 |         <p>For example.</p>
    302 |     </blockquote>
    303 | 
    304 | 305 |

    Output:

    306 | 307 |
    <p>If you want your page to validate under XHTML 1.0 Strict,
    308 | you've got to put paragraph tags in your blockquotes:</p>
    309 | 
    310 | <pre><code>&lt;blockquote&gt;
    311 |     &lt;p&gt;For example.&lt;/p&gt;
    312 | &lt;/blockquote&gt;
    313 | </code></pre>
    314 | 
    315 | -------------------------------------------------------------------------------- /deps/marked/test/tests/markdown_documentation_basics.text: -------------------------------------------------------------------------------- 1 | Markdown: Basics 2 | ================ 3 | 4 | 11 | 12 | 13 | Getting the Gist of Markdown's Formatting Syntax 14 | ------------------------------------------------ 15 | 16 | This page offers a brief overview of what it's like to use Markdown. 17 | The [syntax page] [s] provides complete, detailed documentation for 18 | every feature, but Markdown should be very easy to pick up simply by 19 | looking at a few examples of it in action. The examples on this page 20 | are written in a before/after style, showing example syntax and the 21 | HTML output produced by Markdown. 22 | 23 | It's also helpful to simply try Markdown out; the [Dingus] [d] is a 24 | web application that allows you type your own Markdown-formatted text 25 | and translate it to XHTML. 26 | 27 | **Note:** This document is itself written using Markdown; you 28 | can [see the source for it by adding '.text' to the URL] [src]. 29 | 30 | [s]: /projects/markdown/syntax "Markdown Syntax" 31 | [d]: /projects/markdown/dingus "Markdown Dingus" 32 | [src]: /projects/markdown/basics.text 33 | 34 | 35 | ## Paragraphs, Headers, Blockquotes ## 36 | 37 | A paragraph is simply one or more consecutive lines of text, separated 38 | by one or more blank lines. (A blank line is any line that looks like a 39 | blank line -- a line containing nothing spaces or tabs is considered 40 | blank.) Normal paragraphs should not be intended with spaces or tabs. 41 | 42 | Markdown offers two styles of headers: *Setext* and *atx*. 43 | Setext-style headers for `

    ` and `

    ` are created by 44 | "underlining" with equal signs (`=`) and hyphens (`-`), respectively. 45 | To create an atx-style header, you put 1-6 hash marks (`#`) at the 46 | beginning of the line -- the number of hashes equals the resulting 47 | HTML header level. 48 | 49 | Blockquotes are indicated using email-style '`>`' angle brackets. 50 | 51 | Markdown: 52 | 53 | A First Level Header 54 | ==================== 55 | 56 | A Second Level Header 57 | --------------------- 58 | 59 | Now is the time for all good men to come to 60 | the aid of their country. This is just a 61 | regular paragraph. 62 | 63 | The quick brown fox jumped over the lazy 64 | dog's back. 65 | 66 | ### Header 3 67 | 68 | > This is a blockquote. 69 | > 70 | > This is the second paragraph in the blockquote. 71 | > 72 | > ## This is an H2 in a blockquote 73 | 74 | 75 | Output: 76 | 77 |

    A First Level Header

    78 | 79 |

    A Second Level Header

    80 | 81 |

    Now is the time for all good men to come to 82 | the aid of their country. This is just a 83 | regular paragraph.

    84 | 85 |

    The quick brown fox jumped over the lazy 86 | dog's back.

    87 | 88 |

    Header 3

    89 | 90 |
    91 |

    This is a blockquote.

    92 | 93 |

    This is the second paragraph in the blockquote.

    94 | 95 |

    This is an H2 in a blockquote

    96 |
    97 | 98 | 99 | 100 | ### Phrase Emphasis ### 101 | 102 | Markdown uses asterisks and underscores to indicate spans of emphasis. 103 | 104 | Markdown: 105 | 106 | Some of these words *are emphasized*. 107 | Some of these words _are emphasized also_. 108 | 109 | Use two asterisks for **strong emphasis**. 110 | Or, if you prefer, __use two underscores instead__. 111 | 112 | Output: 113 | 114 |

    Some of these words are emphasized. 115 | Some of these words are emphasized also.

    116 | 117 |

    Use two asterisks for strong emphasis. 118 | Or, if you prefer, use two underscores instead.

    119 | 120 | 121 | 122 | ## Lists ## 123 | 124 | Unordered (bulleted) lists use asterisks, pluses, and hyphens (`*`, 125 | `+`, and `-`) as list markers. These three markers are 126 | interchangable; this: 127 | 128 | * Candy. 129 | * Gum. 130 | * Booze. 131 | 132 | this: 133 | 134 | + Candy. 135 | + Gum. 136 | + Booze. 137 | 138 | and this: 139 | 140 | - Candy. 141 | - Gum. 142 | - Booze. 143 | 144 | all produce the same output: 145 | 146 |
      147 |
    • Candy.
    • 148 |
    • Gum.
    • 149 |
    • Booze.
    • 150 |
    151 | 152 | Ordered (numbered) lists use regular numbers, followed by periods, as 153 | list markers: 154 | 155 | 1. Red 156 | 2. Green 157 | 3. Blue 158 | 159 | Output: 160 | 161 |
      162 |
    1. Red
    2. 163 |
    3. Green
    4. 164 |
    5. Blue
    6. 165 |
    166 | 167 | If you put blank lines between items, you'll get `

    ` tags for the 168 | list item text. You can create multi-paragraph list items by indenting 169 | the paragraphs by 4 spaces or 1 tab: 170 | 171 | * A list item. 172 | 173 | With multiple paragraphs. 174 | 175 | * Another item in the list. 176 | 177 | Output: 178 | 179 |

      180 |
    • A list item.

      181 |

      With multiple paragraphs.

    • 182 |
    • Another item in the list.

    • 183 |
    184 | 185 | 186 | 187 | ### Links ### 188 | 189 | Markdown supports two styles for creating links: *inline* and 190 | *reference*. With both styles, you use square brackets to delimit the 191 | text you want to turn into a link. 192 | 193 | Inline-style links use parentheses immediately after the link text. 194 | For example: 195 | 196 | This is an [example link](http://example.com/). 197 | 198 | Output: 199 | 200 |

    This is an 201 | example link.

    202 | 203 | Optionally, you may include a title attribute in the parentheses: 204 | 205 | This is an [example link](http://example.com/ "With a Title"). 206 | 207 | Output: 208 | 209 |

    This is an 210 | example link.

    211 | 212 | Reference-style links allow you to refer to your links by names, which 213 | you define elsewhere in your document: 214 | 215 | I get 10 times more traffic from [Google][1] than from 216 | [Yahoo][2] or [MSN][3]. 217 | 218 | [1]: http://google.com/ "Google" 219 | [2]: http://search.yahoo.com/ "Yahoo Search" 220 | [3]: http://search.msn.com/ "MSN Search" 221 | 222 | Output: 223 | 224 |

    I get 10 times more traffic from Google than from Yahoo or MSN.

    228 | 229 | The title attribute is optional. Link names may contain letters, 230 | numbers and spaces, but are *not* case sensitive: 231 | 232 | I start my morning with a cup of coffee and 233 | [The New York Times][NY Times]. 234 | 235 | [ny times]: http://www.nytimes.com/ 236 | 237 | Output: 238 | 239 |

    I start my morning with a cup of coffee and 240 | The New York Times.

    241 | 242 | 243 | ### Images ### 244 | 245 | Image syntax is very much like link syntax. 246 | 247 | Inline (titles are optional): 248 | 249 | ![alt text](/path/to/img.jpg "Title") 250 | 251 | Reference-style: 252 | 253 | ![alt text][id] 254 | 255 | [id]: /path/to/img.jpg "Title" 256 | 257 | Both of the above examples produce the same output: 258 | 259 | alt text 260 | 261 | 262 | 263 | ### Code ### 264 | 265 | In a regular paragraph, you can create code span by wrapping text in 266 | backtick quotes. Any ampersands (`&`) and angle brackets (`<` or 267 | `>`) will automatically be translated into HTML entities. This makes 268 | it easy to use Markdown to write about HTML example code: 269 | 270 | I strongly recommend against using any `` tags. 271 | 272 | I wish SmartyPants used named entities like `—` 273 | instead of decimal-encoded entites like `—`. 274 | 275 | Output: 276 | 277 |

    I strongly recommend against using any 278 | <blink> tags.

    279 | 280 |

    I wish SmartyPants used named entities like 281 | &mdash; instead of decimal-encoded 282 | entites like &#8212;.

    283 | 284 | 285 | To specify an entire block of pre-formatted code, indent every line of 286 | the block by 4 spaces or 1 tab. Just like with code spans, `&`, `<`, 287 | and `>` characters will be escaped automatically. 288 | 289 | Markdown: 290 | 291 | If you want your page to validate under XHTML 1.0 Strict, 292 | you've got to put paragraph tags in your blockquotes: 293 | 294 |
    295 |

    For example.

    296 |
    297 | 298 | Output: 299 | 300 |

    If you want your page to validate under XHTML 1.0 Strict, 301 | you've got to put paragraph tags in your blockquotes:

    302 | 303 |
    <blockquote>
    304 |         <p>For example.</p>
    305 |     </blockquote>
    306 |     
    307 | -------------------------------------------------------------------------------- /deps/marked/test/tests/markdown_documentation_syntax.text: -------------------------------------------------------------------------------- 1 | Markdown: Syntax 2 | ================ 3 | 4 | 11 | 12 | 13 | * [Overview](#overview) 14 | * [Philosophy](#philosophy) 15 | * [Inline HTML](#html) 16 | * [Automatic Escaping for Special Characters](#autoescape) 17 | * [Block Elements](#block) 18 | * [Paragraphs and Line Breaks](#p) 19 | * [Headers](#header) 20 | * [Blockquotes](#blockquote) 21 | * [Lists](#list) 22 | * [Code Blocks](#precode) 23 | * [Horizontal Rules](#hr) 24 | * [Span Elements](#span) 25 | * [Links](#link) 26 | * [Emphasis](#em) 27 | * [Code](#code) 28 | * [Images](#img) 29 | * [Miscellaneous](#misc) 30 | * [Backslash Escapes](#backslash) 31 | * [Automatic Links](#autolink) 32 | 33 | 34 | **Note:** This document is itself written using Markdown; you 35 | can [see the source for it by adding '.text' to the URL][src]. 36 | 37 | [src]: /projects/markdown/syntax.text 38 | 39 | * * * 40 | 41 |

    Overview

    42 | 43 |

    Philosophy

    44 | 45 | Markdown is intended to be as easy-to-read and easy-to-write as is feasible. 46 | 47 | Readability, however, is emphasized above all else. A Markdown-formatted 48 | document should be publishable as-is, as plain text, without looking 49 | like it's been marked up with tags or formatting instructions. While 50 | Markdown's syntax has been influenced by several existing text-to-HTML 51 | filters -- including [Setext] [1], [atx] [2], [Textile] [3], [reStructuredText] [4], 52 | [Grutatext] [5], and [EtText] [6] -- the single biggest source of 53 | inspiration for Markdown's syntax is the format of plain text email. 54 | 55 | [1]: http://docutils.sourceforge.net/mirror/setext.html 56 | [2]: http://www.aaronsw.com/2002/atx/ 57 | [3]: http://textism.com/tools/textile/ 58 | [4]: http://docutils.sourceforge.net/rst.html 59 | [5]: http://www.triptico.com/software/grutatxt.html 60 | [6]: http://ettext.taint.org/doc/ 61 | 62 | To this end, Markdown's syntax is comprised entirely of punctuation 63 | characters, which punctuation characters have been carefully chosen so 64 | as to look like what they mean. E.g., asterisks around a word actually 65 | look like \*emphasis\*. Markdown lists look like, well, lists. Even 66 | blockquotes look like quoted passages of text, assuming you've ever 67 | used email. 68 | 69 | 70 | 71 |

    Inline HTML

    72 | 73 | Markdown's syntax is intended for one purpose: to be used as a 74 | format for *writing* for the web. 75 | 76 | Markdown is not a replacement for HTML, or even close to it. Its 77 | syntax is very small, corresponding only to a very small subset of 78 | HTML tags. The idea is *not* to create a syntax that makes it easier 79 | to insert HTML tags. In my opinion, HTML tags are already easy to 80 | insert. The idea for Markdown is to make it easy to read, write, and 81 | edit prose. HTML is a *publishing* format; Markdown is a *writing* 82 | format. Thus, Markdown's formatting syntax only addresses issues that 83 | can be conveyed in plain text. 84 | 85 | For any markup that is not covered by Markdown's syntax, you simply 86 | use HTML itself. There's no need to preface it or delimit it to 87 | indicate that you're switching from Markdown to HTML; you just use 88 | the tags. 89 | 90 | The only restrictions are that block-level HTML elements -- e.g. `
    `, 91 | ``, `
    `, `

    `, etc. -- must be separated from surrounding 92 | content by blank lines, and the start and end tags of the block should 93 | not be indented with tabs or spaces. Markdown is smart enough not 94 | to add extra (unwanted) `

    ` tags around HTML block-level tags. 95 | 96 | For example, to add an HTML table to a Markdown article: 97 | 98 | This is a regular paragraph. 99 | 100 |

    101 | 102 | 103 | 104 |
    Foo
    105 | 106 | This is another regular paragraph. 107 | 108 | Note that Markdown formatting syntax is not processed within block-level 109 | HTML tags. E.g., you can't use Markdown-style `*emphasis*` inside an 110 | HTML block. 111 | 112 | Span-level HTML tags -- e.g. ``, ``, or `` -- can be 113 | used anywhere in a Markdown paragraph, list item, or header. If you 114 | want, you can even use HTML tags instead of Markdown formatting; e.g. if 115 | you'd prefer to use HTML `` or `` tags instead of Markdown's 116 | link or image syntax, go right ahead. 117 | 118 | Unlike block-level HTML tags, Markdown syntax *is* processed within 119 | span-level tags. 120 | 121 | 122 |

    Automatic Escaping for Special Characters

    123 | 124 | In HTML, there are two characters that demand special treatment: `<` 125 | and `&`. Left angle brackets are used to start tags; ampersands are 126 | used to denote HTML entities. If you want to use them as literal 127 | characters, you must escape them as entities, e.g. `<`, and 128 | `&`. 129 | 130 | Ampersands in particular are bedeviling for web writers. If you want to 131 | write about 'AT&T', you need to write '`AT&T`'. You even need to 132 | escape ampersands within URLs. Thus, if you want to link to: 133 | 134 | http://images.google.com/images?num=30&q=larry+bird 135 | 136 | you need to encode the URL as: 137 | 138 | http://images.google.com/images?num=30&q=larry+bird 139 | 140 | in your anchor tag `href` attribute. Needless to say, this is easy to 141 | forget, and is probably the single most common source of HTML validation 142 | errors in otherwise well-marked-up web sites. 143 | 144 | Markdown allows you to use these characters naturally, taking care of 145 | all the necessary escaping for you. If you use an ampersand as part of 146 | an HTML entity, it remains unchanged; otherwise it will be translated 147 | into `&`. 148 | 149 | So, if you want to include a copyright symbol in your article, you can write: 150 | 151 | © 152 | 153 | and Markdown will leave it alone. But if you write: 154 | 155 | AT&T 156 | 157 | Markdown will translate it to: 158 | 159 | AT&T 160 | 161 | Similarly, because Markdown supports [inline HTML](#html), if you use 162 | angle brackets as delimiters for HTML tags, Markdown will treat them as 163 | such. But if you write: 164 | 165 | 4 < 5 166 | 167 | Markdown will translate it to: 168 | 169 | 4 < 5 170 | 171 | However, inside Markdown code spans and blocks, angle brackets and 172 | ampersands are *always* encoded automatically. This makes it easy to use 173 | Markdown to write about HTML code. (As opposed to raw HTML, which is a 174 | terrible format for writing about HTML syntax, because every single `<` 175 | and `&` in your example code needs to be escaped.) 176 | 177 | 178 | * * * 179 | 180 | 181 |

    Block Elements

    182 | 183 | 184 |

    Paragraphs and Line Breaks

    185 | 186 | A paragraph is simply one or more consecutive lines of text, separated 187 | by one or more blank lines. (A blank line is any line that looks like a 188 | blank line -- a line containing nothing but spaces or tabs is considered 189 | blank.) Normal paragraphs should not be intended with spaces or tabs. 190 | 191 | The implication of the "one or more consecutive lines of text" rule is 192 | that Markdown supports "hard-wrapped" text paragraphs. This differs 193 | significantly from most other text-to-HTML formatters (including Movable 194 | Type's "Convert Line Breaks" option) which translate every line break 195 | character in a paragraph into a `
    ` tag. 196 | 197 | When you *do* want to insert a `
    ` break tag using Markdown, you 198 | end a line with two or more spaces, then type return. 199 | 200 | Yes, this takes a tad more effort to create a `
    `, but a simplistic 201 | "every line break is a `
    `" rule wouldn't work for Markdown. 202 | Markdown's email-style [blockquoting][bq] and multi-paragraph [list items][l] 203 | work best -- and look better -- when you format them with hard breaks. 204 | 205 | [bq]: #blockquote 206 | [l]: #list 207 | 208 | 209 | 210 | 211 | 212 | Markdown supports two styles of headers, [Setext] [1] and [atx] [2]. 213 | 214 | Setext-style headers are "underlined" using equal signs (for first-level 215 | headers) and dashes (for second-level headers). For example: 216 | 217 | This is an H1 218 | ============= 219 | 220 | This is an H2 221 | ------------- 222 | 223 | Any number of underlining `=`'s or `-`'s will work. 224 | 225 | Atx-style headers use 1-6 hash characters at the start of the line, 226 | corresponding to header levels 1-6. For example: 227 | 228 | # This is an H1 229 | 230 | ## This is an H2 231 | 232 | ###### This is an H6 233 | 234 | Optionally, you may "close" atx-style headers. This is purely 235 | cosmetic -- you can use this if you think it looks better. The 236 | closing hashes don't even need to match the number of hashes 237 | used to open the header. (The number of opening hashes 238 | determines the header level.) : 239 | 240 | # This is an H1 # 241 | 242 | ## This is an H2 ## 243 | 244 | ### This is an H3 ###### 245 | 246 | 247 |

    Blockquotes

    248 | 249 | Markdown uses email-style `>` characters for blockquoting. If you're 250 | familiar with quoting passages of text in an email message, then you 251 | know how to create a blockquote in Markdown. It looks best if you hard 252 | wrap the text and put a `>` before every line: 253 | 254 | > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, 255 | > consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. 256 | > Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. 257 | > 258 | > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse 259 | > id sem consectetuer libero luctus adipiscing. 260 | 261 | Markdown allows you to be lazy and only put the `>` before the first 262 | line of a hard-wrapped paragraph: 263 | 264 | > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, 265 | consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. 266 | Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. 267 | 268 | > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse 269 | id sem consectetuer libero luctus adipiscing. 270 | 271 | Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by 272 | adding additional levels of `>`: 273 | 274 | > This is the first level of quoting. 275 | > 276 | > > This is nested blockquote. 277 | > 278 | > Back to the first level. 279 | 280 | Blockquotes can contain other Markdown elements, including headers, lists, 281 | and code blocks: 282 | 283 | > ## This is a header. 284 | > 285 | > 1. This is the first list item. 286 | > 2. This is the second list item. 287 | > 288 | > Here's some example code: 289 | > 290 | > return shell_exec("echo $input | $markdown_script"); 291 | 292 | Any decent text editor should make email-style quoting easy. For 293 | example, with BBEdit, you can make a selection and choose Increase 294 | Quote Level from the Text menu. 295 | 296 | 297 |

    Lists

    298 | 299 | Markdown supports ordered (numbered) and unordered (bulleted) lists. 300 | 301 | Unordered lists use asterisks, pluses, and hyphens -- interchangably 302 | -- as list markers: 303 | 304 | * Red 305 | * Green 306 | * Blue 307 | 308 | is equivalent to: 309 | 310 | + Red 311 | + Green 312 | + Blue 313 | 314 | and: 315 | 316 | - Red 317 | - Green 318 | - Blue 319 | 320 | Ordered lists use numbers followed by periods: 321 | 322 | 1. Bird 323 | 2. McHale 324 | 3. Parish 325 | 326 | It's important to note that the actual numbers you use to mark the 327 | list have no effect on the HTML output Markdown produces. The HTML 328 | Markdown produces from the above list is: 329 | 330 |
      331 |
    1. Bird
    2. 332 |
    3. McHale
    4. 333 |
    5. Parish
    6. 334 |
    335 | 336 | If you instead wrote the list in Markdown like this: 337 | 338 | 1. Bird 339 | 1. McHale 340 | 1. Parish 341 | 342 | or even: 343 | 344 | 3. Bird 345 | 1. McHale 346 | 8. Parish 347 | 348 | you'd get the exact same HTML output. The point is, if you want to, 349 | you can use ordinal numbers in your ordered Markdown lists, so that 350 | the numbers in your source match the numbers in your published HTML. 351 | But if you want to be lazy, you don't have to. 352 | 353 | If you do use lazy list numbering, however, you should still start the 354 | list with the number 1. At some point in the future, Markdown may support 355 | starting ordered lists at an arbitrary number. 356 | 357 | List markers typically start at the left margin, but may be indented by 358 | up to three spaces. List markers must be followed by one or more spaces 359 | or a tab. 360 | 361 | To make lists look nice, you can wrap items with hanging indents: 362 | 363 | * Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 364 | Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, 365 | viverra nec, fringilla in, laoreet vitae, risus. 366 | * Donec sit amet nisl. Aliquam semper ipsum sit amet velit. 367 | Suspendisse id sem consectetuer libero luctus adipiscing. 368 | 369 | But if you want to be lazy, you don't have to: 370 | 371 | * Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 372 | Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, 373 | viverra nec, fringilla in, laoreet vitae, risus. 374 | * Donec sit amet nisl. Aliquam semper ipsum sit amet velit. 375 | Suspendisse id sem consectetuer libero luctus adipiscing. 376 | 377 | If list items are separated by blank lines, Markdown will wrap the 378 | items in `

    ` tags in the HTML output. For example, this input: 379 | 380 | * Bird 381 | * Magic 382 | 383 | will turn into: 384 | 385 |

      386 |
    • Bird
    • 387 |
    • Magic
    • 388 |
    389 | 390 | But this: 391 | 392 | * Bird 393 | 394 | * Magic 395 | 396 | will turn into: 397 | 398 |
      399 |
    • Bird

    • 400 |
    • Magic

    • 401 |
    402 | 403 | List items may consist of multiple paragraphs. Each subsequent 404 | paragraph in a list item must be intended by either 4 spaces 405 | or one tab: 406 | 407 | 1. This is a list item with two paragraphs. Lorem ipsum dolor 408 | sit amet, consectetuer adipiscing elit. Aliquam hendrerit 409 | mi posuere lectus. 410 | 411 | Vestibulum enim wisi, viverra nec, fringilla in, laoreet 412 | vitae, risus. Donec sit amet nisl. Aliquam semper ipsum 413 | sit amet velit. 414 | 415 | 2. Suspendisse id sem consectetuer libero luctus adipiscing. 416 | 417 | It looks nice if you indent every line of the subsequent 418 | paragraphs, but here again, Markdown will allow you to be 419 | lazy: 420 | 421 | * This is a list item with two paragraphs. 422 | 423 | This is the second paragraph in the list item. You're 424 | only required to indent the first line. Lorem ipsum dolor 425 | sit amet, consectetuer adipiscing elit. 426 | 427 | * Another item in the same list. 428 | 429 | To put a blockquote within a list item, the blockquote's `>` 430 | delimiters need to be indented: 431 | 432 | * A list item with a blockquote: 433 | 434 | > This is a blockquote 435 | > inside a list item. 436 | 437 | To put a code block within a list item, the code block needs 438 | to be indented *twice* -- 8 spaces or two tabs: 439 | 440 | * A list item with a code block: 441 | 442 | 443 | 444 | 445 | It's worth noting that it's possible to trigger an ordered list by 446 | accident, by writing something like this: 447 | 448 | 1986. What a great season. 449 | 450 | In other words, a *number-period-space* sequence at the beginning of a 451 | line. To avoid this, you can backslash-escape the period: 452 | 453 | 1986\. What a great season. 454 | 455 | 456 | 457 |

    Code Blocks

    458 | 459 | Pre-formatted code blocks are used for writing about programming or 460 | markup source code. Rather than forming normal paragraphs, the lines 461 | of a code block are interpreted literally. Markdown wraps a code block 462 | in both `
    ` and `` tags.
    463 | 
    464 | To produce a code block in Markdown, simply indent every line of the
    465 | block by at least 4 spaces or 1 tab. For example, given this input:
    466 | 
    467 |     This is a normal paragraph:
    468 | 
    469 |         This is a code block.
    470 | 
    471 | Markdown will generate:
    472 | 
    473 |     

    This is a normal paragraph:

    474 | 475 |
    This is a code block.
    476 |     
    477 | 478 | One level of indentation -- 4 spaces or 1 tab -- is removed from each 479 | line of the code block. For example, this: 480 | 481 | Here is an example of AppleScript: 482 | 483 | tell application "Foo" 484 | beep 485 | end tell 486 | 487 | will turn into: 488 | 489 |

    Here is an example of AppleScript:

    490 | 491 |
    tell application "Foo"
    492 |         beep
    493 |     end tell
    494 |     
    495 | 496 | A code block continues until it reaches a line that is not indented 497 | (or the end of the article). 498 | 499 | Within a code block, ampersands (`&`) and angle brackets (`<` and `>`) 500 | are automatically converted into HTML entities. This makes it very 501 | easy to include example HTML source code using Markdown -- just paste 502 | it and indent it, and Markdown will handle the hassle of encoding the 503 | ampersands and angle brackets. For example, this: 504 | 505 | 508 | 509 | will turn into: 510 | 511 |
    <div class="footer">
    512 |         &copy; 2004 Foo Corporation
    513 |     </div>
    514 |     
    515 | 516 | Regular Markdown syntax is not processed within code blocks. E.g., 517 | asterisks are just literal asterisks within a code block. This means 518 | it's also easy to use Markdown to write about Markdown's own syntax. 519 | 520 | 521 | 522 |

    Horizontal Rules

    523 | 524 | You can produce a horizontal rule tag (`
    `) by placing three or 525 | more hyphens, asterisks, or underscores on a line by themselves. If you 526 | wish, you may use spaces between the hyphens or asterisks. Each of the 527 | following lines will produce a horizontal rule: 528 | 529 | * * * 530 | 531 | *** 532 | 533 | ***** 534 | 535 | - - - 536 | 537 | --------------------------------------- 538 | 539 | _ _ _ 540 | 541 | 542 | * * * 543 | 544 |

    Span Elements

    545 | 546 | 547 | 548 | Markdown supports two style of links: *inline* and *reference*. 549 | 550 | In both styles, the link text is delimited by [square brackets]. 551 | 552 | To create an inline link, use a set of regular parentheses immediately 553 | after the link text's closing square bracket. Inside the parentheses, 554 | put the URL where you want the link to point, along with an *optional* 555 | title for the link, surrounded in quotes. For example: 556 | 557 | This is [an example](http://example.com/ "Title") inline link. 558 | 559 | [This link](http://example.net/) has no title attribute. 560 | 561 | Will produce: 562 | 563 |

    This is 564 | an example inline link.

    565 | 566 |

    This link has no 567 | title attribute.

    568 | 569 | If you're referring to a local resource on the same server, you can 570 | use relative paths: 571 | 572 | See my [About](/about/) page for details. 573 | 574 | Reference-style links use a second set of square brackets, inside 575 | which you place a label of your choosing to identify the link: 576 | 577 | This is [an example][id] reference-style link. 578 | 579 | You can optionally use a space to separate the sets of brackets: 580 | 581 | This is [an example] [id] reference-style link. 582 | 583 | Then, anywhere in the document, you define your link label like this, 584 | on a line by itself: 585 | 586 | [id]: http://example.com/ "Optional Title Here" 587 | 588 | That is: 589 | 590 | * Square brackets containing the link identifier (optionally 591 | indented from the left margin using up to three spaces); 592 | * followed by a colon; 593 | * followed by one or more spaces (or tabs); 594 | * followed by the URL for the link; 595 | * optionally followed by a title attribute for the link, enclosed 596 | in double or single quotes. 597 | 598 | The link URL may, optionally, be surrounded by angle brackets: 599 | 600 | [id]: "Optional Title Here" 601 | 602 | You can put the title attribute on the next line and use extra spaces 603 | or tabs for padding, which tends to look better with longer URLs: 604 | 605 | [id]: http://example.com/longish/path/to/resource/here 606 | "Optional Title Here" 607 | 608 | Link definitions are only used for creating links during Markdown 609 | processing, and are stripped from your document in the HTML output. 610 | 611 | Link definition names may constist of letters, numbers, spaces, and punctuation -- but they are *not* case sensitive. E.g. these two links: 612 | 613 | [link text][a] 614 | [link text][A] 615 | 616 | are equivalent. 617 | 618 | The *implicit link name* shortcut allows you to omit the name of the 619 | link, in which case the link text itself is used as the name. 620 | Just use an empty set of square brackets -- e.g., to link the word 621 | "Google" to the google.com web site, you could simply write: 622 | 623 | [Google][] 624 | 625 | And then define the link: 626 | 627 | [Google]: http://google.com/ 628 | 629 | Because link names may contain spaces, this shortcut even works for 630 | multiple words in the link text: 631 | 632 | Visit [Daring Fireball][] for more information. 633 | 634 | And then define the link: 635 | 636 | [Daring Fireball]: http://daringfireball.net/ 637 | 638 | Link definitions can be placed anywhere in your Markdown document. I 639 | tend to put them immediately after each paragraph in which they're 640 | used, but if you want, you can put them all at the end of your 641 | document, sort of like footnotes. 642 | 643 | Here's an example of reference links in action: 644 | 645 | I get 10 times more traffic from [Google] [1] than from 646 | [Yahoo] [2] or [MSN] [3]. 647 | 648 | [1]: http://google.com/ "Google" 649 | [2]: http://search.yahoo.com/ "Yahoo Search" 650 | [3]: http://search.msn.com/ "MSN Search" 651 | 652 | Using the implicit link name shortcut, you could instead write: 653 | 654 | I get 10 times more traffic from [Google][] than from 655 | [Yahoo][] or [MSN][]. 656 | 657 | [google]: http://google.com/ "Google" 658 | [yahoo]: http://search.yahoo.com/ "Yahoo Search" 659 | [msn]: http://search.msn.com/ "MSN Search" 660 | 661 | Both of the above examples will produce the following HTML output: 662 | 663 |

    I get 10 times more traffic from Google than from 665 | Yahoo 666 | or MSN.

    667 | 668 | For comparison, here is the same paragraph written using 669 | Markdown's inline link style: 670 | 671 | I get 10 times more traffic from [Google](http://google.com/ "Google") 672 | than from [Yahoo](http://search.yahoo.com/ "Yahoo Search") or 673 | [MSN](http://search.msn.com/ "MSN Search"). 674 | 675 | The point of reference-style links is not that they're easier to 676 | write. The point is that with reference-style links, your document 677 | source is vastly more readable. Compare the above examples: using 678 | reference-style links, the paragraph itself is only 81 characters 679 | long; with inline-style links, it's 176 characters; and as raw HTML, 680 | it's 234 characters. In the raw HTML, there's more markup than there 681 | is text. 682 | 683 | With Markdown's reference-style links, a source document much more 684 | closely resembles the final output, as rendered in a browser. By 685 | allowing you to move the markup-related metadata out of the paragraph, 686 | you can add links without interrupting the narrative flow of your 687 | prose. 688 | 689 | 690 |

    Emphasis

    691 | 692 | Markdown treats asterisks (`*`) and underscores (`_`) as indicators of 693 | emphasis. Text wrapped with one `*` or `_` will be wrapped with an 694 | HTML `` tag; double `*`'s or `_`'s will be wrapped with an HTML 695 | `` tag. E.g., this input: 696 | 697 | *single asterisks* 698 | 699 | _single underscores_ 700 | 701 | **double asterisks** 702 | 703 | __double underscores__ 704 | 705 | will produce: 706 | 707 | single asterisks 708 | 709 | single underscores 710 | 711 | double asterisks 712 | 713 | double underscores 714 | 715 | You can use whichever style you prefer; the lone restriction is that 716 | the same character must be used to open and close an emphasis span. 717 | 718 | Emphasis can be used in the middle of a word: 719 | 720 | un*fucking*believable 721 | 722 | But if you surround an `*` or `_` with spaces, it'll be treated as a 723 | literal asterisk or underscore. 724 | 725 | To produce a literal asterisk or underscore at a position where it 726 | would otherwise be used as an emphasis delimiter, you can backslash 727 | escape it: 728 | 729 | \*this text is surrounded by literal asterisks\* 730 | 731 | 732 | 733 |

    Code

    734 | 735 | To indicate a span of code, wrap it with backtick quotes (`` ` ``). 736 | Unlike a pre-formatted code block, a code span indicates code within a 737 | normal paragraph. For example: 738 | 739 | Use the `printf()` function. 740 | 741 | will produce: 742 | 743 |

    Use the printf() function.

    744 | 745 | To include a literal backtick character within a code span, you can use 746 | multiple backticks as the opening and closing delimiters: 747 | 748 | ``There is a literal backtick (`) here.`` 749 | 750 | which will produce this: 751 | 752 |

    There is a literal backtick (`) here.

    753 | 754 | The backtick delimiters surrounding a code span may include spaces -- 755 | one after the opening, one before the closing. This allows you to place 756 | literal backtick characters at the beginning or end of a code span: 757 | 758 | A single backtick in a code span: `` ` `` 759 | 760 | A backtick-delimited string in a code span: `` `foo` `` 761 | 762 | will produce: 763 | 764 |

    A single backtick in a code span: `

    765 | 766 |

    A backtick-delimited string in a code span: `foo`

    767 | 768 | With a code span, ampersands and angle brackets are encoded as HTML 769 | entities automatically, which makes it easy to include example HTML 770 | tags. Markdown will turn this: 771 | 772 | Please don't use any `` tags. 773 | 774 | into: 775 | 776 |

    Please don't use any <blink> tags.

    777 | 778 | You can write this: 779 | 780 | `—` is the decimal-encoded equivalent of `—`. 781 | 782 | to produce: 783 | 784 |

    &#8212; is the decimal-encoded 785 | equivalent of &mdash;.

    786 | 787 | 788 | 789 |

    Images

    790 | 791 | Admittedly, it's fairly difficult to devise a "natural" syntax for 792 | placing images into a plain text document format. 793 | 794 | Markdown uses an image syntax that is intended to resemble the syntax 795 | for links, allowing for two styles: *inline* and *reference*. 796 | 797 | Inline image syntax looks like this: 798 | 799 | ![Alt text](/path/to/img.jpg) 800 | 801 | ![Alt text](/path/to/img.jpg "Optional title") 802 | 803 | That is: 804 | 805 | * An exclamation mark: `!`; 806 | * followed by a set of square brackets, containing the `alt` 807 | attribute text for the image; 808 | * followed by a set of parentheses, containing the URL or path to 809 | the image, and an optional `title` attribute enclosed in double 810 | or single quotes. 811 | 812 | Reference-style image syntax looks like this: 813 | 814 | ![Alt text][id] 815 | 816 | Where "id" is the name of a defined image reference. Image references 817 | are defined using syntax identical to link references: 818 | 819 | [id]: url/to/image "Optional title attribute" 820 | 821 | As of this writing, Markdown has no syntax for specifying the 822 | dimensions of an image; if this is important to you, you can simply 823 | use regular HTML `` tags. 824 | 825 | 826 | * * * 827 | 828 | 829 |

    Miscellaneous

    830 | 831 | 832 | 833 | Markdown supports a shortcut style for creating "automatic" links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this: 834 | 835 | 836 | 837 | Markdown will turn this into: 838 | 839 | http://example.com/ 840 | 841 | Automatic links for email addresses work similarly, except that 842 | Markdown will also perform a bit of randomized decimal and hex 843 | entity-encoding to help obscure your address from address-harvesting 844 | spambots. For example, Markdown will turn this: 845 | 846 | 847 | 848 | into something like this: 849 | 850 | address@exa 853 | mple.com 854 | 855 | which will render in a browser as a clickable link to "address@example.com". 856 | 857 | (This sort of entity-encoding trick will indeed fool many, if not 858 | most, address-harvesting bots, but it definitely won't fool all of 859 | them. It's better than nothing, but an address published in this way 860 | will probably eventually start receiving spam.) 861 | 862 | 863 | 864 |

    Backslash Escapes

    865 | 866 | Markdown allows you to use backslash escapes to generate literal 867 | characters which would otherwise have special meaning in Markdown's 868 | formatting syntax. For example, if you wanted to surround a word with 869 | literal asterisks (instead of an HTML `` tag), you can backslashes 870 | before the asterisks, like this: 871 | 872 | \*literal asterisks\* 873 | 874 | Markdown provides backslash escapes for the following characters: 875 | 876 | \ backslash 877 | ` backtick 878 | * asterisk 879 | _ underscore 880 | {} curly braces 881 | [] square brackets 882 | () parentheses 883 | # hash mark 884 | + plus sign 885 | - minus sign (hyphen) 886 | . dot 887 | ! exclamation mark 888 | 889 | -------------------------------------------------------------------------------- /deps/marked/test/tests/nested_blockquotes.html: -------------------------------------------------------------------------------- 1 |
    2 |

    foo

    3 | 4 |
    5 |

    bar

    6 |
    7 | 8 |

    foo

    9 |
    10 | -------------------------------------------------------------------------------- /deps/marked/test/tests/nested_blockquotes.text: -------------------------------------------------------------------------------- 1 | > foo 2 | > 3 | > > bar 4 | > 5 | > foo 6 | -------------------------------------------------------------------------------- /deps/marked/test/tests/nested_code.html: -------------------------------------------------------------------------------- 1 |

    hi ther `` ok ```

    2 | -------------------------------------------------------------------------------- /deps/marked/test/tests/nested_code.text: -------------------------------------------------------------------------------- 1 | ````` hi ther `` ok ``` ````` 2 | -------------------------------------------------------------------------------- /deps/marked/test/tests/nested_em.html: -------------------------------------------------------------------------------- 1 |

    test test test

    2 | 3 |

    test test test

    4 | -------------------------------------------------------------------------------- /deps/marked/test/tests/nested_em.text: -------------------------------------------------------------------------------- 1 | *test **test** test* 2 | 3 | _test __test__ test_ 4 | -------------------------------------------------------------------------------- /deps/marked/test/tests/nested_square_link.html: -------------------------------------------------------------------------------- 1 |

    the ] character

    2 | -------------------------------------------------------------------------------- /deps/marked/test/tests/nested_square_link.text: -------------------------------------------------------------------------------- 1 | [the `]` character](/url) 2 | -------------------------------------------------------------------------------- /deps/marked/test/tests/not_a_link.html: -------------------------------------------------------------------------------- 1 |

    \[test](not a link)

    2 | -------------------------------------------------------------------------------- /deps/marked/test/tests/not_a_link.text: -------------------------------------------------------------------------------- 1 | \\[test](not a link) 2 | -------------------------------------------------------------------------------- /deps/marked/test/tests/ordered_and_unordered_lists.html: -------------------------------------------------------------------------------- 1 |

    Unordered

    2 | 3 |

    Asterisks tight:

    4 | 5 |
      6 |
    • asterisk 1
    • 7 |
    • asterisk 2
    • 8 |
    • asterisk 3
    • 9 |
    10 | 11 |

    Asterisks loose:

    12 | 13 |
      14 |
    • asterisk 1

    • 15 |
    • asterisk 2

    • 16 |
    • asterisk 3

    • 17 |
    18 | 19 |
    20 | 21 |

    Pluses tight:

    22 | 23 |
      24 |
    • Plus 1
    • 25 |
    • Plus 2
    • 26 |
    • Plus 3
    • 27 |
    28 | 29 |

    Pluses loose:

    30 | 31 |
      32 |
    • Plus 1

    • 33 |
    • Plus 2

    • 34 |
    • Plus 3

    • 35 |
    36 | 37 |
    38 | 39 |

    Minuses tight:

    40 | 41 |
      42 |
    • Minus 1
    • 43 |
    • Minus 2
    • 44 |
    • Minus 3
    • 45 |
    46 | 47 |

    Minuses loose:

    48 | 49 |
      50 |
    • Minus 1

    • 51 |
    • Minus 2

    • 52 |
    • Minus 3

    • 53 |
    54 | 55 |

    Ordered

    56 | 57 |

    Tight:

    58 | 59 |
      60 |
    1. First
    2. 61 |
    3. Second
    4. 62 |
    5. Third
    6. 63 |
    64 | 65 |

    and:

    66 | 67 |
      68 |
    1. One
    2. 69 |
    3. Two
    4. 70 |
    5. Three
    6. 71 |
    72 | 73 |

    Loose using tabs:

    74 | 75 |
      76 |
    1. First

    2. 77 |
    3. Second

    4. 78 |
    5. Third

    6. 79 |
    80 | 81 |

    and using spaces:

    82 | 83 |
      84 |
    1. One

    2. 85 |
    3. Two

    4. 86 |
    5. Three

    6. 87 |
    88 | 89 |

    Multiple paragraphs:

    90 | 91 |
      92 |
    1. Item 1, graf one.

      93 | 94 |

      Item 2. graf two. The quick brown fox jumped over the lazy dog's 95 | back.

    2. 96 |
    3. Item 2.

    4. 97 |
    5. Item 3.

    6. 98 |
    99 | 100 |

    Nested

    101 | 102 |
      103 |
    • Tab 104 |
        105 |
      • Tab 106 |
          107 |
        • Tab
        • 108 |
      • 109 |
    • 110 |
    111 | 112 |

    Here's another:

    113 | 114 |
      115 |
    1. First
    2. 116 |
    3. Second: 117 |
        118 |
      • Fee
      • 119 |
      • Fie
      • 120 |
      • Foe
      • 121 |
    4. 122 |
    5. Third
    6. 123 |
    124 | 125 |

    Same thing but with paragraphs:

    126 | 127 |
      128 |
    1. First

    2. 129 |
    3. Second:

      130 | 131 |
        132 |
      • Fee
      • 133 |
      • Fie
      • 134 |
      • Foe
      • 135 |
    4. 136 |
    5. Third

    6. 137 |
    138 | 139 | 140 |

    This was an error in Markdown 1.0.1:

    141 | 142 |
      143 |
    • this

      144 | 145 |
      • sub
      146 | 147 |

      that

    • 148 |
    149 | -------------------------------------------------------------------------------- /deps/marked/test/tests/ordered_and_unordered_lists.text: -------------------------------------------------------------------------------- 1 | ## Unordered 2 | 3 | Asterisks tight: 4 | 5 | * asterisk 1 6 | * asterisk 2 7 | * asterisk 3 8 | 9 | 10 | Asterisks loose: 11 | 12 | * asterisk 1 13 | 14 | * asterisk 2 15 | 16 | * asterisk 3 17 | 18 | * * * 19 | 20 | Pluses tight: 21 | 22 | + Plus 1 23 | + Plus 2 24 | + Plus 3 25 | 26 | 27 | Pluses loose: 28 | 29 | + Plus 1 30 | 31 | + Plus 2 32 | 33 | + Plus 3 34 | 35 | * * * 36 | 37 | 38 | Minuses tight: 39 | 40 | - Minus 1 41 | - Minus 2 42 | - Minus 3 43 | 44 | 45 | Minuses loose: 46 | 47 | - Minus 1 48 | 49 | - Minus 2 50 | 51 | - Minus 3 52 | 53 | 54 | ## Ordered 55 | 56 | Tight: 57 | 58 | 1. First 59 | 2. Second 60 | 3. Third 61 | 62 | and: 63 | 64 | 1. One 65 | 2. Two 66 | 3. Three 67 | 68 | 69 | Loose using tabs: 70 | 71 | 1. First 72 | 73 | 2. Second 74 | 75 | 3. Third 76 | 77 | and using spaces: 78 | 79 | 1. One 80 | 81 | 2. Two 82 | 83 | 3. Three 84 | 85 | Multiple paragraphs: 86 | 87 | 1. Item 1, graf one. 88 | 89 | Item 2. graf two. The quick brown fox jumped over the lazy dog's 90 | back. 91 | 92 | 2. Item 2. 93 | 94 | 3. Item 3. 95 | 96 | 97 | 98 | ## Nested 99 | 100 | * Tab 101 | * Tab 102 | * Tab 103 | 104 | Here's another: 105 | 106 | 1. First 107 | 2. Second: 108 | * Fee 109 | * Fie 110 | * Foe 111 | 3. Third 112 | 113 | Same thing but with paragraphs: 114 | 115 | 1. First 116 | 117 | 2. Second: 118 | * Fee 119 | * Fie 120 | * Foe 121 | 122 | 3. Third 123 | 124 | 125 | This was an error in Markdown 1.0.1: 126 | 127 | * this 128 | 129 | * sub 130 | 131 | that 132 | -------------------------------------------------------------------------------- /deps/marked/test/tests/ref_paren.html: -------------------------------------------------------------------------------- 1 |

    hi

    2 | -------------------------------------------------------------------------------- /deps/marked/test/tests/ref_paren.text: -------------------------------------------------------------------------------- 1 | [hi] 2 | 3 | [hi]: /url (there) 4 | -------------------------------------------------------------------------------- /deps/marked/test/tests/same_bullet.html: -------------------------------------------------------------------------------- 1 |
      2 |
    • test
    • 3 |
    • test
    • 4 |
    • test
    • 5 |
    6 | -------------------------------------------------------------------------------- /deps/marked/test/tests/same_bullet.text: -------------------------------------------------------------------------------- 1 | * test 2 | + test 3 | - test 4 | -------------------------------------------------------------------------------- /deps/marked/test/tests/strong_and_em_together.html: -------------------------------------------------------------------------------- 1 |

    This is strong and em.

    2 | 3 |

    So is this word.

    4 | 5 |

    This is strong and em.

    6 | 7 |

    So is this word.

    8 | -------------------------------------------------------------------------------- /deps/marked/test/tests/strong_and_em_together.text: -------------------------------------------------------------------------------- 1 | ***This is strong and em.*** 2 | 3 | So is ***this*** word. 4 | 5 | ___This is strong and em.___ 6 | 7 | So is ___this___ word. 8 | -------------------------------------------------------------------------------- /deps/marked/test/tests/tabs.html: -------------------------------------------------------------------------------- 1 |
      2 |
    • this is a list item 3 | indented with tabs

    • 4 |
    • this is a list item 5 | indented with spaces

    • 6 |
    7 | 8 |

    Code:

    9 | 10 |
    this code block is indented by one tab
    11 | 
    12 | 13 |

    And:

    14 | 15 |
        this code block is indented by two tabs
    16 | 
    17 | 18 |

    And:

    19 | 20 |
    +   this is an example list item
    21 |     indented with tabs
    22 | 
    23 | +   this is an example list item
    24 |     indented with spaces
    25 | 
    26 | -------------------------------------------------------------------------------- /deps/marked/test/tests/tabs.text: -------------------------------------------------------------------------------- 1 | + this is a list item 2 | indented with tabs 3 | 4 | + this is a list item 5 | indented with spaces 6 | 7 | Code: 8 | 9 | this code block is indented by one tab 10 | 11 | And: 12 | 13 | this code block is indented by two tabs 14 | 15 | And: 16 | 17 | + this is an example list item 18 | indented with tabs 19 | 20 | + this is an example list item 21 | indented with spaces 22 | -------------------------------------------------------------------------------- /deps/marked/test/tests/tidyness.html: -------------------------------------------------------------------------------- 1 |
    2 |

    A list within a blockquote:

    3 |
      4 |
    • asterisk 1
    • 5 |
    • asterisk 2
    • 6 |
    • asterisk 3
    • 7 |
    8 |
    9 | -------------------------------------------------------------------------------- /deps/marked/test/tests/tidyness.text: -------------------------------------------------------------------------------- 1 | > A list within a blockquote: 2 | > 3 | > * asterisk 1 4 | > * asterisk 2 5 | > * asterisk 3 6 | -------------------------------------------------------------------------------- /deps/marked/test/tests/toplevel_paragraphs.html: -------------------------------------------------------------------------------- 1 |

    hello world 2 | how are you 3 | how are you

    4 | 5 |

    hello world

    6 |
    how are you
    7 | 8 |

    hello world

    9 |
    10 | 11 |

    hello world

    12 |

    how are you

    13 | 14 |

    hello world

    15 |

    how are you

    16 | 17 |

    hello world

    18 |

    how are you

    19 | 20 |

    hello world 21 | * how are you

    22 | 23 |

    hello world

    24 |
    how are you
    25 | 26 |

    hello world 27 | how are you

    28 | 29 |

    hello world 30 |

    31 | 32 |
    hello
    33 | 34 |

    hello

    35 | -------------------------------------------------------------------------------- /deps/marked/test/tests/toplevel_paragraphs.text: -------------------------------------------------------------------------------- 1 | hello world 2 | how are you 3 | how are you 4 | 5 | hello world 6 | ``` 7 | how are you 8 | ``` 9 | 10 | hello world 11 | * * * 12 | 13 | hello world 14 | # how are you 15 | 16 | hello world 17 | how are you 18 | =========== 19 | 20 | hello world 21 | > how are you 22 | 23 | hello world 24 | * how are you 25 | 26 | hello world 27 |
    how are you
    28 | 29 | hello world 30 | how are you 31 | 32 | hello [world][how] 33 | [how]: /are/you 34 | 35 |
    hello
    36 | 37 | hello 38 | -------------------------------------------------------------------------------- /deps/marked/test/tests/tricky_list.html: -------------------------------------------------------------------------------- 1 |

    hello world

    2 | 3 |
      4 |
    • hello world
    • 5 |
    6 | 7 |

    hello world

    8 | 9 |
      10 |
    • hello world
    • 11 |
    12 | 13 |

    hello world

    14 | 15 |
      16 |
    • Hello world
    • 17 |
    18 | 19 |

    hello world

    20 | 21 |
      22 |
    • hello world
    • 23 |
    24 | -------------------------------------------------------------------------------- /deps/marked/test/tests/tricky_list.text: -------------------------------------------------------------------------------- 1 | **hello** _world_ 2 | 3 | * hello world 4 | 5 | **hello** _world_ 6 | 7 | * hello world 8 | 9 | **hello** _world_ 10 | 11 | * Hello world 12 | 13 | **hello** _world_ 14 | 15 | * hello world 16 | -------------------------------------------------------------------------------- /lib/find.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var async = require('async'); 3 | var path = require('path'); 4 | var _ = require('underscore'); 5 | var npm = require('npm'); 6 | 7 | if (fs.existsSync) path.existsSync = fs.existsSync; 8 | if (fs.exists) path.exists = fs.exists; 9 | 10 | // ## `root` find the root directory for a given module 11 | // ### `module` the module whose root directory we're trying to find 12 | // ### `done` continuation to respond to when complete 13 | // ### `global` *internal* search global packages 14 | 15 | exports.root = function root (module, done, global) { 16 | if (global) npm.dir = npm.globalDir; 17 | else npm.dir = process.cwd(); 18 | npm.config.set('global', !!global); 19 | 20 | npm.commands.ls([], true, function (err, data) { 21 | if (err) return done(err); 22 | 23 | var queue = [data], found, node; 24 | 25 | // breadth first search the tree for the node we're looking for 26 | while (queue.length > 0) { 27 | node = queue.shift(); 28 | // console.log(node.name); 29 | if (node.name == module && node.path) { 30 | done(null, node.path); 31 | found = true; 32 | break; 33 | } 34 | _.each(node.dependencies, function (item) { queue.push(item); }); 35 | } 36 | 37 | if (!found) { 38 | // if we found nothing, call this function again, this time searching 39 | // global packages 40 | if (!global) root(module, done, true); 41 | else done(new Error('module ' + module + ' not found')); 42 | } 43 | }); 44 | }; 45 | 46 | // ## `docs` find the doc directory for the module root supplied 47 | // ### `root` a package root to search 48 | // ### `done` continuation to respond to when complete 49 | 50 | exports.docDir = function docDir (root, done) { 51 | var tries = ['docs', 'doc', '.']; 52 | 53 | fs.readFile(path.join(root, 'package.json'), function (err, data) { 54 | if (err) throw err; 55 | data = JSON.parse(data); 56 | data = data.directories && data.directories.doc; 57 | if (data) tries.push(data); 58 | 59 | tries = tries.map(function (item) { 60 | return path.join(root, item); 61 | }); 62 | 63 | tries = _.uniq(tries); 64 | 65 | async.filter(tries, path.exists, function (result) { 66 | done(null, result); 67 | }); 68 | }); 69 | }; 70 | 71 | // ## `addMdExts` add various markdown extensions to the given arguments 72 | // ### `arguments` arguments to add markdown extensions to 73 | 74 | function addMdExts () { 75 | var args = Array.prototype.slice.call(arguments); 76 | return args.reduce(function (memo, item) { 77 | return memo.concat([ 78 | item + '.md', 79 | item + '.mkdn', 80 | item + '.mdown', 81 | item + '.markdown' 82 | ]); 83 | }, []); 84 | } 85 | 86 | // ## `file` try to find a file matching the given query and give its contents 87 | // to `done` 88 | // ### `dirs` array of directories to search in 89 | // ### `args` arguments of query 90 | // ### `module` name of the module 91 | // ### `done` continuation to respond to when complete 92 | 93 | exports.file = function file (dirs, args, module, done) { 94 | // reform dirs into an array of files to try 95 | var tries = dirs.reduce(function (memo, item) { 96 | var base = path.join(item, path.join.apply(null, args)); 97 | 98 | // for supporting module/args*.md 99 | memo = memo.concat(addMdExts(path.join(base))); 100 | // for supporting module/args*/index.md 101 | memo = memo.concat(addMdExts(path.join(base, 'index'))); 102 | 103 | if (args && args.length !== 0) { 104 | // for supporting module/args*/lastarg.md 105 | memo = memo.concat(addMdExts(path.join(base, args[args.length-1]))); 106 | } else { 107 | // for supporting module/docs/modulename.md 108 | memo = memo.concat(addMdExts(path.join(base, module))); 109 | 110 | // for supporting README.md 111 | memo = memo.concat(addMdExts( 112 | path.join(base, 'Readme'), 113 | path.join(base, 'ReadMe'), 114 | path.join(base, 'readme'), 115 | path.join(base, 'README') 116 | )); 117 | } 118 | 119 | return memo; 120 | }, []); 121 | 122 | // find the first of the `tries` array which actually exists, and return it 123 | async.detectSeries(tries, path.exists, function (result) { 124 | if (result) fs.readFile(result, 'utf8', done); 125 | else done(new Error('no markdown files found matching query')); 126 | }); 127 | }; 128 | 129 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nd", 3 | "author": "Russ Frank ", 4 | "description": "a documentation viewer for node", 5 | "version": "1.2.0", 6 | "preferGlobal": true, 7 | "homepage": "https://github.com/rf/nd", 8 | "bugs": { 9 | "url": "https://github.com/rf/nd/issues" 10 | }, 11 | "repository": { 12 | "url": "https://github.com/rf/nd.git", 13 | "type": "git" 14 | }, 15 | "dependencies": { 16 | "flatiron": "0.1.x", 17 | "underscore": "1.3.x", 18 | "async": "0.1.x", 19 | "colors": "0.6.x", 20 | "wordwrap": "0.0.x", 21 | "underscore.string": "2.2.x", 22 | "npm": "*", 23 | "request": "2.9.x", 24 | "moar": "0.0.x" 25 | }, 26 | "devDependencies": { 27 | "mocha": "1.0.x" 28 | }, 29 | "scripts": { 30 | "test": "mocha -R spec -u tdd test/*-test.js", 31 | "start": "node app.js" 32 | }, 33 | "bin": { 34 | "nd": "./bin/nd" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rf/nd/a48ae4116d1c5d143e1c2312ffd9c1aef884714c/shot.png -------------------------------------------------------------------------------- /windows-shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rf/nd/a48ae4116d1c5d143e1c2312ffd9c1aef884714c/windows-shot.png --------------------------------------------------------------------------------