From 88c8f9a668a6715e4a65d763daeb9475bc494ff7 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Wed, 28 Dec 2016 22:19:40 -0500 Subject: [PATCH] fix(cli): Fix error reporting in the CLI --- bin/documentation.js | 8 +- lib/commands/build.js | 6 +- .../auto_lang_hljs/multilanguage.output.md | 4 - .../boolean-literal-type.output.md.json | 47 -- test/fixture/class.config.output.md | 7 - test/fixture/class.output.md.json | 97 --- ...orted-export-default-object.output.md.json | 69 -- ...ported-export-default-value.output.md.json | 47 -- test/fixture/document-exported.output.md.json | 703 ------------------ test/fixture/es6-class.output.md.json | 119 --- test/fixture/es6-default2.output.md.json | 47 -- test/fixture/es6-import.output.md.json | 91 --- test/fixture/es6.output.md.json | 471 ------------ test/fixture/event.output.md.json | 47 -- test/fixture/example-caption.output.md.json | 47 -- test/fixture/external.output.md.json | 47 -- test/fixture/factory.output.md.json | 91 --- test/fixture/infer-private.output.md.json | 75 -- test/fixture/inheritance.output.md.json | 69 -- test/fixture/inline-link.output.md.json | 69 -- test/fixture/internal.output.md.json | 47 -- test/fixture/literal_types.output.md.json | 69 -- test/fixture/memberedclass.output.md.json | 97 --- .../fixture/merge-infered-type.output.md.json | 47 -- test/fixture/multisignature.output.md.json | 69 -- test/fixture/nearby_params.output.md.json | 47 -- test/fixture/nest_params.output.md.json | 69 -- .../newline-in-description.output.md.json | 19 - test/fixture/no-name.output.md.json | 19 - .../optional-record-field-type.output.md.json | 47 -- test/fixture/params.output.md.json | 229 ------ test/fixture/react-jsx.output.md.json | 47 -- test/fixture/readme/README.output.md | 5 - .../require-json-no-extension.output.md.json | 19 - test/fixture/require-json.output.md.json | 19 - test/fixture/simple-hashbang.output.md.json | 47 -- test/fixture/simple-private.output.md.json | 19 - test/fixture/simple-singlestar.output.md.json | 19 - test/fixture/simple-triplestar.output.md.json | 19 - test/fixture/simple-two.output.md.json | 47 -- test/fixture/simple.output.github.md | 4 - test/fixture/simple.output.md.json | 47 -- test/fixture/sort-order-alpha.output.md.json | 301 -------- .../fixture/string-literal-key.output.md.json | 69 -- test/fixture/sync/alias.output.md.json | 47 -- .../fixture/sync/empty-example.output.md.json | 47 -- test/fixture/sync/flow-types.output.md.json | 245 ------ .../sync/lots-of-options.output.md.json | 47 -- test/fixture/sync/meta.output.md.json | 47 -- test/fixture/sync/multiexample.output.md.json | 47 -- test/fixture/sync/rename.output.md.json | 47 -- test/fixture/sync/throws.output.md.json | 47 -- .../fixture/sync/trailing-only.output.md.json | 19 - test/fixture/sync/trailing.output.md.json | 91 --- test/fixture/sync/typedef.output.md.json | 47 -- test/fixture/system-import.output.md.json | 47 -- test/fixture/this-class.output.md.json | 147 ---- test/fixture/type_application.output.md.json | 47 -- .../var-function-param-return.output.md.json | 47 -- test/test.js | 4 +- 60 files changed, 13 insertions(+), 4592 deletions(-) diff --git a/bin/documentation.js b/bin/documentation.js index 1b4931d..fc27555 100755 --- a/bin/documentation.js +++ b/bin/documentation.js @@ -13,7 +13,13 @@ var argv = yargs .command(commands.lint) .command(commands.readme) .fail(function (msg, error) { - throw error; + if (error) { + throw error; + } else { + yargs.showHelp('error'); + console.error(msg); + return yargs.exit(1); + } }) .version(function () { return require('../package').version; diff --git a/lib/commands/build.js b/lib/commands/build.js index 852c2a8..633973d 100644 --- a/lib/commands/build.js +++ b/lib/commands/build.js @@ -49,7 +49,6 @@ module.exports.builder = extend({}, * just a thin wrapper around this one. */ module.exports.handler = function build(argv, callback) { - console.log(argv); argv._handled = true; argv = sharedOptions.expandInputs(argv); if (argv.f === 'html' && argv.o === 'stdout') { @@ -57,7 +56,10 @@ module.exports.handler = function build(argv, callback) { } var generator = documentation.build - .bind(null, argv.input, argv, onDocumented); function onDocumented(err, comments) { if (err) { + .bind(null, argv.input, argv, onDocumented); + + function onDocumented(err, comments) { + if (err) { if (typeof callback === 'function') { return callback(err); } diff --git a/test/fixture/auto_lang_hljs/multilanguage.output.md b/test/fixture/auto_lang_hljs/multilanguage.output.md index c7c1fe5..e648388 100644 --- a/test/fixture/auto_lang_hljs/multilanguage.output.md +++ b/test/fixture/auto_lang_hljs/multilanguage.output.md @@ -1,9 +1,5 @@ -### Table of Contents - -- [multilanguage.input](#multilanguageinput) - ## multilanguage.input **Extends Foo, Bar** diff --git a/test/fixture/boolean-literal-type.output.md.json b/test/fixture/boolean-literal-type.output.md.json index c59ae7b..3f5dff1 100644 --- a/test/fixture/boolean-literal-type.output.md.json +++ b/test/fixture/boolean-literal-type.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#f", - "children": [ - { - "type": "text", - "value": "f" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/class.config.output.md b/test/fixture/class.config.output.md index ed2aaa9..5f0f252 100644 --- a/test/fixture/class.config.output.md +++ b/test/fixture/class.config.output.md @@ -1,12 +1,5 @@ -### Table of Contents - -- [MyClass](#myclass) - - [getFoo](#getfoo) - - [getUndefined](#getundefined) -- [Hello](#hello) - ## MyClass This is my class, a demo thing. diff --git a/test/fixture/class.output.md.json b/test/fixture/class.output.md.json index 8efdb7a..962b349 100644 --- a/test/fixture/class.output.md.json +++ b/test/fixture/class.output.md.json @@ -5,103 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#myclass", - "children": [ - { - "type": "text", - "value": "MyClass" - } - ] - } - ] - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#getfoo", - "children": [ - { - "type": "text", - "value": "getFoo" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#getundefined", - "children": [ - { - "type": "text", - "value": "getUndefined" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/document-exported-export-default-object.output.md.json b/test/fixture/document-exported-export-default-object.output.md.json index 1bb5925..6ca318d 100644 --- a/test/fixture/document-exported-export-default-object.output.md.json +++ b/test/fixture/document-exported-export-default-object.output.md.json @@ -5,75 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#document-exported-export-default-objectinput", - "children": [ - { - "type": "text", - "value": "document-exported-export-default-object.input" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#x", - "children": [ - { - "type": "text", - "value": "x" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/document-exported-export-default-value.output.md.json b/test/fixture/document-exported-export-default-value.output.md.json index fb2e887..d4a0c52 100644 --- a/test/fixture/document-exported-export-default-value.output.md.json +++ b/test/fixture/document-exported-export-default-value.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#document-exported-export-default-valueinput", - "children": [ - { - "type": "text", - "value": "document-exported-export-default-value.input" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/document-exported.output.md.json b/test/fixture/document-exported.output.md.json index 7a602f7..6065877 100644 --- a/test/fixture/document-exported.output.md.json +++ b/test/fixture/document-exported.output.md.json @@ -5,709 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#z", - "children": [ - { - "type": "text", - "value": "z" - } - ] - } - ] - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#zmethod", - "children": [ - { - "type": "text", - "value": "zMethod" - } - ] - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#x", - "children": [ - { - "type": "text", - "value": "x" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#class", - "children": [ - { - "type": "text", - "value": "Class" - } - ] - } - ] - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#classmethod", - "children": [ - { - "type": "text", - "value": "classMethod" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#classgetter", - "children": [ - { - "type": "text", - "value": "classGetter" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#classsetter", - "children": [ - { - "type": "text", - "value": "classSetter" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#staticmethod", - "children": [ - { - "type": "text", - "value": "staticMethod" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#staticgetter", - "children": [ - { - "type": "text", - "value": "staticGetter" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#staticsetter", - "children": [ - { - "type": "text", - "value": "staticSetter" - } - ] - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#t5", - "children": [ - { - "type": "text", - "value": "T5" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#y2default", - "children": [ - { - "type": "text", - "value": "y2Default" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#y4", - "children": [ - { - "type": "text", - "value": "y4" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#object", - "children": [ - { - "type": "text", - "value": "object" - } - ] - } - ] - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#prop", - "children": [ - { - "type": "text", - "value": "prop" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#func", - "children": [ - { - "type": "text", - "value": "func" - } - ] - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#method", - "children": [ - { - "type": "text", - "value": "method" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#getter", - "children": [ - { - "type": "text", - "value": "getter" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#setter", - "children": [ - { - "type": "text", - "value": "setter" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#f1", - "children": [ - { - "type": "text", - "value": "f1" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#f3", - "children": [ - { - "type": "text", - "value": "f3" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#t", - "children": [ - { - "type": "text", - "value": "T" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#t2", - "children": [ - { - "type": "text", - "value": "T2" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#t4", - "children": [ - { - "type": "text", - "value": "T4" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#f4", - "children": [ - { - "type": "text", - "value": "f4" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#o1", - "children": [ - { - "type": "text", - "value": "o1" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#om1", - "children": [ - { - "type": "text", - "value": "om1" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#f5", - "children": [ - { - "type": "text", - "value": "f5" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#o2", - "children": [ - { - "type": "text", - "value": "o2" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#om2", - "children": [ - { - "type": "text", - "value": "om2" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/es6-class.output.md.json b/test/fixture/es6-class.output.md.json index 30e48a4..3ea160e 100644 --- a/test/fixture/es6-class.output.md.json +++ b/test/fixture/es6-class.output.md.json @@ -5,125 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#foo", - "children": [ - { - "type": "text", - "value": "Foo" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#bar", - "children": [ - { - "type": "text", - "value": "Bar" - } - ] - } - ] - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#constructor", - "children": [ - { - "type": "text", - "value": "constructor" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#bar-1", - "children": [ - { - "type": "text", - "value": "bar" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/es6-default2.output.md.json b/test/fixture/es6-default2.output.md.json index 5b20bb0..a4facdb 100644 --- a/test/fixture/es6-default2.output.md.json +++ b/test/fixture/es6-default2.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#es6-default2input", - "children": [ - { - "type": "text", - "value": "es6-default2.input" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/es6-import.output.md.json b/test/fixture/es6-import.output.md.json index b4142af..9ae20c5 100644 --- a/test/fixture/es6-import.output.md.json +++ b/test/fixture/es6-import.output.md.json @@ -5,97 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#multiplytwice", - "children": [ - { - "type": "text", - "value": "multiplyTwice" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#es6-ext", - "children": [ - { - "type": "text", - "value": "es6-ext" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#simpleinput", - "children": [ - { - "type": "text", - "value": "simple.input" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/es6.output.md.json b/test/fixture/es6.output.md.json index 3a7a26f..e2e2b81 100644 --- a/test/fixture/es6.output.md.json +++ b/test/fixture/es6.output.md.json @@ -5,477 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#destructure", - "children": [ - { - "type": "text", - "value": "destructure" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#destructure-1", - "children": [ - { - "type": "text", - "value": "destructure" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#multiply", - "children": [ - { - "type": "text", - "value": "multiply" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#sink", - "children": [ - { - "type": "text", - "value": "Sink" - } - ] - } - ] - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#staticprop", - "children": [ - { - "type": "text", - "value": "staticProp" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#empty", - "children": [ - { - "type": "text", - "value": "empty" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#agetter", - "children": [ - { - "type": "text", - "value": "aGetter" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#constructor", - "children": [ - { - "type": "text", - "value": "constructor" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#hello", - "children": [ - { - "type": "text", - "value": "hello" - } - ] - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#makeabasket", - "children": [ - { - "type": "text", - "value": "makeABasket" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#makeasink", - "children": [ - { - "type": "text", - "value": "makeASink" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#functionwithrest", - "children": [ - { - "type": "text", - "value": "functionWithRest" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#functionwithrestandtype", - "children": [ - { - "type": "text", - "value": "functionWithRestAndType" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#foo", - "children": [ - { - "type": "text", - "value": "foo" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#es6input", - "children": [ - { - "type": "text", - "value": "es6.input" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#veryimportanttransform", - "children": [ - { - "type": "text", - "value": "veryImportantTransform" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#iamprotected", - "children": [ - { - "type": "text", - "value": "iAmProtected" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#iampublic", - "children": [ - { - "type": "text", - "value": "iAmPublic" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#execute", - "children": [ - { - "type": "text", - "value": "execute" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#isarrayequalwith", - "children": [ - { - "type": "text", - "value": "isArrayEqualWith" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/event.output.md.json b/test/fixture/event.output.md.json index c64707a..5e43d48 100644 --- a/test/fixture/event.output.md.json +++ b/test/fixture/event.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#mapmousemove", - "children": [ - { - "type": "text", - "value": "Map#mousemove" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/example-caption.output.md.json b/test/fixture/example-caption.output.md.json index 2f174b7..50a27aa 100644 --- a/test/fixture/example-caption.output.md.json +++ b/test/fixture/example-caption.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#foo", - "children": [ - { - "type": "text", - "value": "foo" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/external.output.md.json b/test/fixture/external.output.md.json index 908a79f..e85a11a 100644 --- a/test/fixture/external.output.md.json +++ b/test/fixture/external.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#foo", - "children": [ - { - "type": "text", - "value": "foo" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/factory.output.md.json b/test/fixture/factory.output.md.json index 3027797..293fdb4 100644 --- a/test/fixture/factory.output.md.json +++ b/test/fixture/factory.output.md.json @@ -5,97 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#area", - "children": [ - { - "type": "text", - "value": "area" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#area-1", - "children": [ - { - "type": "text", - "value": "area" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#data", - "children": [ - { - "type": "text", - "value": "data" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/infer-private.output.md.json b/test/fixture/infer-private.output.md.json index 2ec83e5..c28ac99 100644 --- a/test/fixture/infer-private.output.md.json +++ b/test/fixture/infer-private.output.md.json @@ -5,81 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#c", - "children": [ - { - "type": "text", - "value": "C" - } - ] - } - ] - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#m", - "children": [ - { - "type": "text", - "value": "m" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/inheritance.output.md.json b/test/fixture/inheritance.output.md.json index f3f66f2..a13aa00 100644 --- a/test/fixture/inheritance.output.md.json +++ b/test/fixture/inheritance.output.md.json @@ -5,75 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#specialarray", - "children": [ - { - "type": "text", - "value": "SpecialArray" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#foo", - "children": [ - { - "type": "text", - "value": "Foo" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/inline-link.output.md.json b/test/fixture/inline-link.output.md.json index 5556d69..7a44b24 100644 --- a/test/fixture/inline-link.output.md.json +++ b/test/fixture/inline-link.output.md.json @@ -5,75 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#addone", - "children": [ - { - "type": "text", - "value": "addOne" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#inline-linkinput", - "children": [ - { - "type": "text", - "value": "inline-link.input" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/internal.output.md.json b/test/fixture/internal.output.md.json index 908a79f..e85a11a 100644 --- a/test/fixture/internal.output.md.json +++ b/test/fixture/internal.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#foo", - "children": [ - { - "type": "text", - "value": "foo" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/literal_types.output.md.json b/test/fixture/literal_types.output.md.json index 5c37008..14583c3 100644 --- a/test/fixture/literal_types.output.md.json +++ b/test/fixture/literal_types.output.md.json @@ -5,75 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#f", - "children": [ - { - "type": "text", - "value": "f" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#g", - "children": [ - { - "type": "text", - "value": "g" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/memberedclass.output.md.json b/test/fixture/memberedclass.output.md.json index af39eb7..4de61d9 100644 --- a/test/fixture/memberedclass.output.md.json +++ b/test/fixture/memberedclass.output.md.json @@ -5,103 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#myclass", - "children": [ - { - "type": "text", - "value": "MyClass" - } - ] - } - ] - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#getfoo", - "children": [ - { - "type": "text", - "value": "getFoo" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#getundefined", - "children": [ - { - "type": "text", - "value": "getUndefined" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/merge-infered-type.output.md.json b/test/fixture/merge-infered-type.output.md.json index 8915db6..be9210c 100644 --- a/test/fixture/merge-infered-type.output.md.json +++ b/test/fixture/merge-infered-type.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#addfive", - "children": [ - { - "type": "text", - "value": "addFive" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/multisignature.output.md.json b/test/fixture/multisignature.output.md.json index 09f8f0f..a165f7a 100644 --- a/test/fixture/multisignature.output.md.json +++ b/test/fixture/multisignature.output.md.json @@ -5,75 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#getthetime", - "children": [ - { - "type": "text", - "value": "getTheTime" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#getthetime-1", - "children": [ - { - "type": "text", - "value": "getTheTime" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/nearby_params.output.md.json b/test/fixture/nearby_params.output.md.json index e8c53be..6ae645e 100644 --- a/test/fixture/nearby_params.output.md.json +++ b/test/fixture/nearby_params.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#sessionscreate", - "children": [ - { - "type": "text", - "value": "sessions.create" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/nest_params.output.md.json b/test/fixture/nest_params.output.md.json index 58ed827..908d2e1 100644 --- a/test/fixture/nest_params.output.md.json +++ b/test/fixture/nest_params.output.md.json @@ -5,75 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#foo", - "children": [ - { - "type": "text", - "value": "foo" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#foo-1", - "children": [ - { - "type": "text", - "value": "foo" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/newline-in-description.output.md.json b/test/fixture/newline-in-description.output.md.json index bd94fd3..a69c51a 100644 --- a/test/fixture/newline-in-description.output.md.json +++ b/test/fixture/newline-in-description.output.md.json @@ -5,25 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/no-name.output.md.json b/test/fixture/no-name.output.md.json index d706040..d993702 100644 --- a/test/fixture/no-name.output.md.json +++ b/test/fixture/no-name.output.md.json @@ -5,25 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/optional-record-field-type.output.md.json b/test/fixture/optional-record-field-type.output.md.json index e51b7ad..a5526b9 100644 --- a/test/fixture/optional-record-field-type.output.md.json +++ b/test/fixture/optional-record-field-type.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#record", - "children": [ - { - "type": "text", - "value": "Record" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/params.output.md.json b/test/fixture/params.output.md.json index dd2461e..3bee700 100644 --- a/test/fixture/params.output.md.json +++ b/test/fixture/params.output.md.json @@ -5,235 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#addthem", - "children": [ - { - "type": "text", - "value": "addThem" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#fishesandfoxes", - "children": [ - { - "type": "text", - "value": "fishesAndFoxes" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#withdefault", - "children": [ - { - "type": "text", - "value": "withDefault" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#foo", - "children": [ - { - "type": "text", - "value": "Foo" - } - ] - } - ] - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#method", - "children": [ - { - "type": "text", - "value": "method" - } - ] - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#address6", - "children": [ - { - "type": "text", - "value": "Address6" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#geojsonsource", - "children": [ - { - "type": "text", - "value": "GeoJSONSource" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#myfunc", - "children": [ - { - "type": "text", - "value": "myfunc" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#foo-1", - "children": [ - { - "type": "text", - "value": "foo" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/react-jsx.output.md.json b/test/fixture/react-jsx.output.md.json index aa13aef..5e8d487 100644 --- a/test/fixture/react-jsx.output.md.json +++ b/test/fixture/react-jsx.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#apples", - "children": [ - { - "type": "text", - "value": "apples" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/readme/README.output.md b/test/fixture/readme/README.output.md index 88b395e..54991d5 100644 --- a/test/fixture/readme/README.output.md +++ b/test/fixture/readme/README.output.md @@ -4,11 +4,6 @@ -### Table of Contents - -- [foo](#foo) -- [bar](#bar) - ## foo A function with documentation. diff --git a/test/fixture/require-json-no-extension.output.md.json b/test/fixture/require-json-no-extension.output.md.json index 5580786..c410924 100644 --- a/test/fixture/require-json-no-extension.output.md.json +++ b/test/fixture/require-json-no-extension.output.md.json @@ -4,25 +4,6 @@ { "type": "html", "value": "" - }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } } ] } \ No newline at end of file diff --git a/test/fixture/require-json.output.md.json b/test/fixture/require-json.output.md.json index 5580786..c410924 100644 --- a/test/fixture/require-json.output.md.json +++ b/test/fixture/require-json.output.md.json @@ -4,25 +4,6 @@ { "type": "html", "value": "" - }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } } ] } \ No newline at end of file diff --git a/test/fixture/simple-hashbang.output.md.json b/test/fixture/simple-hashbang.output.md.json index 1a68a45..caabc79 100644 --- a/test/fixture/simple-hashbang.output.md.json +++ b/test/fixture/simple-hashbang.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#simple-hashbanginput", - "children": [ - { - "type": "text", - "value": "simple-hashbang.input" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/simple-private.output.md.json b/test/fixture/simple-private.output.md.json index 5580786..c410924 100644 --- a/test/fixture/simple-private.output.md.json +++ b/test/fixture/simple-private.output.md.json @@ -4,25 +4,6 @@ { "type": "html", "value": "" - }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } } ] } \ No newline at end of file diff --git a/test/fixture/simple-singlestar.output.md.json b/test/fixture/simple-singlestar.output.md.json index 5580786..c410924 100644 --- a/test/fixture/simple-singlestar.output.md.json +++ b/test/fixture/simple-singlestar.output.md.json @@ -4,25 +4,6 @@ { "type": "html", "value": "" - }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } } ] } \ No newline at end of file diff --git a/test/fixture/simple-triplestar.output.md.json b/test/fixture/simple-triplestar.output.md.json index 5580786..c410924 100644 --- a/test/fixture/simple-triplestar.output.md.json +++ b/test/fixture/simple-triplestar.output.md.json @@ -4,25 +4,6 @@ { "type": "html", "value": "" - }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } } ] } \ No newline at end of file diff --git a/test/fixture/simple-two.output.md.json b/test/fixture/simple-two.output.md.json index 998d6d4..71f9b48 100644 --- a/test/fixture/simple-two.output.md.json +++ b/test/fixture/simple-two.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#returntwo", - "children": [ - { - "type": "text", - "value": "returnTwo" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/simple.output.github.md b/test/fixture/simple.output.github.md index 7dfae4d..43aadcb 100644 --- a/test/fixture/simple.output.github.md +++ b/test/fixture/simple.output.github.md @@ -1,9 +1,5 @@ -### Table of Contents - -- [simple.input](#simpleinput) - ## simple.input [test/fixture/simple.input.js:5-8]([github] "Source code on GitHub") diff --git a/test/fixture/simple.output.md.json b/test/fixture/simple.output.md.json index fe34187..3413add 100644 --- a/test/fixture/simple.output.md.json +++ b/test/fixture/simple.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#simpleinput", - "children": [ - { - "type": "text", - "value": "simple.input" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/sort-order-alpha.output.md.json b/test/fixture/sort-order-alpha.output.md.json index b7157fd..17ca468 100644 --- a/test/fixture/sort-order-alpha.output.md.json +++ b/test/fixture/sort-order-alpha.output.md.json @@ -5,307 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#a", - "children": [ - { - "type": "text", - "value": "a" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#b", - "children": [ - { - "type": "text", - "value": "b" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#c", - "children": [ - { - "type": "text", - "value": "C" - } - ] - } - ] - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#a-1", - "children": [ - { - "type": "text", - "value": "A" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#a-2", - "children": [ - { - "type": "text", - "value": "a" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#b-1", - "children": [ - { - "type": "text", - "value": "B" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#b-2", - "children": [ - { - "type": "text", - "value": "b" - } - ] - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#d", - "children": [ - { - "type": "text", - "value": "D" - } - ] - } - ] - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#a-3", - "children": [ - { - "type": "text", - "value": "A" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#a-4", - "children": [ - { - "type": "text", - "value": "a" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#b-3", - "children": [ - { - "type": "text", - "value": "B" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#b-4", - "children": [ - { - "type": "text", - "value": "b" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/string-literal-key.output.md.json b/test/fixture/string-literal-key.output.md.json index c202a7c..ad9763e 100644 --- a/test/fixture/string-literal-key.output.md.json +++ b/test/fixture/string-literal-key.output.md.json @@ -5,75 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#mycontainerobject", - "children": [ - { - "type": "text", - "value": "MyContainerObject" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#foo", - "children": [ - { - "type": "text", - "value": "foo" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/sync/alias.output.md.json b/test/fixture/sync/alias.output.md.json index c3a231d..83aac11 100644 --- a/test/fixture/sync/alias.output.md.json +++ b/test/fixture/sync/alias.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#nixon", - "children": [ - { - "type": "text", - "value": "nixon" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/sync/empty-example.output.md.json b/test/fixture/sync/empty-example.output.md.json index 648bab5..1e6973f 100644 --- a/test/fixture/sync/empty-example.output.md.json +++ b/test/fixture/sync/empty-example.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#returntwo", - "children": [ - { - "type": "text", - "value": "returnTwo" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/sync/flow-types.output.md.json b/test/fixture/sync/flow-types.output.md.json index 88f1517..380be90 100644 --- a/test/fixture/sync/flow-types.output.md.json +++ b/test/fixture/sync/flow-types.output.md.json @@ -5,251 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#addthem", - "children": [ - { - "type": "text", - "value": "addThem" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#point", - "children": [ - { - "type": "text", - "value": "Point" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#two", - "children": [ - { - "type": "text", - "value": "Two" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#t", - "children": [ - { - "type": "text", - "value": "T" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#t-1", - "children": [ - { - "type": "text", - "value": "T" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#veryimportanttransform", - "children": [ - { - "type": "text", - "value": "veryImportantTransform" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#optionalfunc", - "children": [ - { - "type": "text", - "value": "optionalFunc" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#objectparamfn", - "children": [ - { - "type": "text", - "value": "objectParamFn" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#objectparamfn-1", - "children": [ - { - "type": "text", - "value": "objectParamFn" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#someobjectapi", - "children": [ - { - "type": "text", - "value": "SomeObjectAPI" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/sync/lots-of-options.output.md.json b/test/fixture/sync/lots-of-options.output.md.json index 9b82176..b014acd 100644 --- a/test/fixture/sync/lots-of-options.output.md.json +++ b/test/fixture/sync/lots-of-options.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#gsd", - "children": [ - { - "type": "text", - "value": "gsd" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/sync/meta.output.md.json b/test/fixture/sync/meta.output.md.json index ff65e91..3302e7e 100644 --- a/test/fixture/sync/meta.output.md.json +++ b/test/fixture/sync/meta.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#dewey", - "children": [ - { - "type": "text", - "value": "dewey" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/sync/multiexample.output.md.json b/test/fixture/sync/multiexample.output.md.json index a59b261..642b881 100644 --- a/test/fixture/sync/multiexample.output.md.json +++ b/test/fixture/sync/multiexample.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#multiexampleinput", - "children": [ - { - "type": "text", - "value": "multiexample.input" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/sync/rename.output.md.json b/test/fixture/sync/rename.output.md.json index 1c39e40..5fd911e 100644 --- a/test/fixture/sync/rename.output.md.json +++ b/test/fixture/sync/rename.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#cheese", - "children": [ - { - "type": "text", - "value": "cheese" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/sync/throws.output.md.json b/test/fixture/sync/throws.output.md.json index c272dd7..9cfcf89 100644 --- a/test/fixture/sync/throws.output.md.json +++ b/test/fixture/sync/throws.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#returntwo", - "children": [ - { - "type": "text", - "value": "returnTwo" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/sync/trailing-only.output.md.json b/test/fixture/sync/trailing-only.output.md.json index d92da51..4e76f74 100644 --- a/test/fixture/sync/trailing-only.output.md.json +++ b/test/fixture/sync/trailing-only.output.md.json @@ -5,25 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/sync/trailing.output.md.json b/test/fixture/sync/trailing.output.md.json index 749cbe9..4e5a2e4 100644 --- a/test/fixture/sync/trailing.output.md.json +++ b/test/fixture/sync/trailing.output.md.json @@ -5,97 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#foobar", - "children": [ - { - "type": "text", - "value": "fooBar" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#foobaz", - "children": [ - { - "type": "text", - "value": "fooBaz" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#something", - "children": [ - { - "type": "text", - "value": "Something" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/sync/typedef.output.md.json b/test/fixture/sync/typedef.output.md.json index b900c62..f898cfa 100644 --- a/test/fixture/sync/typedef.output.md.json +++ b/test/fixture/sync/typedef.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#mytype", - "children": [ - { - "type": "text", - "value": "MyType" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/system-import.output.md.json b/test/fixture/system-import.output.md.json index fe34187..3413add 100644 --- a/test/fixture/system-import.output.md.json +++ b/test/fixture/system-import.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#simpleinput", - "children": [ - { - "type": "text", - "value": "simple.input" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/this-class.output.md.json b/test/fixture/this-class.output.md.json index d8f4d6b..63cc89d 100644 --- a/test/fixture/this-class.output.md.json +++ b/test/fixture/this-class.output.md.json @@ -5,153 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#bookshelf", - "children": [ - { - "type": "text", - "value": "bookshelf" - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#book", - "children": [ - { - "type": "text", - "value": "Book" - } - ] - } - ] - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#title", - "children": [ - { - "type": "text", - "value": "title" - } - ] - } - ] - } - ] - } - ] - } - ] - }, - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#bookshelf-1", - "children": [ - { - "type": "text", - "value": "BookShelf" - } - ] - } - ] - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#title-1", - "children": [ - { - "type": "text", - "value": "title" - } - ] - } - ] - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/type_application.output.md.json b/test/fixture/type_application.output.md.json index 78b569c..8b378fa 100644 --- a/test/fixture/type_application.output.md.json +++ b/test/fixture/type_application.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#address6", - "children": [ - { - "type": "text", - "value": "Address6" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/fixture/var-function-param-return.output.md.json b/test/fixture/var-function-param-return.output.md.json index 1710cfe..205b981 100644 --- a/test/fixture/var-function-param-return.output.md.json +++ b/test/fixture/var-function-param-return.output.md.json @@ -5,53 +5,6 @@ "type": "html", "value": "" }, - { - "depth": 3, - "type": "heading", - "children": [ - { - "type": "text", - "value": "Table of Contents" - } - ], - "data": { - "id": "table-of-contents", - "htmlAttributes": { - "id": "table-of-contents" - }, - "hProperties": { - "id": "table-of-contents" - } - } - }, - { - "type": "list", - "ordered": false, - "children": [ - { - "type": "listItem", - "loose": false, - "children": [ - { - "type": "paragraph", - "children": [ - { - "type": "link", - "title": null, - "url": "#f", - "children": [ - { - "type": "text", - "value": "f" - } - ] - } - ] - } - ] - } - ] - }, { "depth": 2, "type": "heading", diff --git a/test/test.js b/test/test.js index 9dec1d3..db67a91 100644 --- a/test/test.js +++ b/test/test.js @@ -143,7 +143,7 @@ test('outputs', function (ttt) { tt.ifError(err); tt.test('markdown', function (t) { - outputMarkdown(_.cloneDeep(result), {}, function (err, result) { + outputMarkdown(_.cloneDeep(result), { markdownToc: true }, function (err, result) { t.ifError(err); var outputfile = file.replace('.input.js', '.output.md'); if (UPDATE) { @@ -212,7 +212,7 @@ test('outputs - sync', function (ttt) { var result = documentation.buildSync([file], readOptionsFromFile(file)); tt.test('markdown', function (t) { - outputMarkdown(result, {}, function (err, result) { + outputMarkdown(result, { markdownToc: true }, function (err, result) { t.ifError(err); var outputfile = file.replace('.input.js', '.output.md'); if (UPDATE) {