diff --git a/__tests__/__snapshots__/bin-readme.js.snap b/__tests__/__snapshots__/bin-readme.js.snap index f82e9545f..d5272a090 100644 --- a/__tests__/__snapshots__/bin-readme.js.snap +++ b/__tests__/__snapshots__/bin-readme.js.snap @@ -9,10 +9,10 @@ exports[`readme autodetection of different filenames updates readme.markdown 1`] ### Table of Contents -- [foo](#foo) - - [Parameters](#parameters) -- [bar](#bar) - - [Parameters](#parameters-1) +* [foo](#foo) + * [Parameters](#parameters) +* [bar](#bar) + * [Parameters](#parameters-1) ## foo @@ -20,7 +20,7 @@ A function with documentation. ### Parameters -- \`a\` {string} blah +* \`a\` {string} blah Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** answer @@ -30,7 +30,7 @@ A second function with docs ### Parameters -- \`b\` +* \`b\` # Another section " @@ -45,10 +45,10 @@ exports[`readme command --readme-file 1`] = ` ### Table of Contents -- [foo](#foo) - - [Parameters](#parameters) -- [bar](#bar) - - [Parameters](#parameters-1) +* [foo](#foo) + * [Parameters](#parameters) +* [bar](#bar) + * [Parameters](#parameters-1) ## foo @@ -56,7 +56,7 @@ A function with documentation. ### Parameters -- \`a\` {string} blah +* \`a\` {string} blah Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** answer @@ -66,7 +66,7 @@ A second function with docs ### Parameters -- \`b\` +* \`b\` # Another section " @@ -81,10 +81,10 @@ exports[`readme command updates README.md 1`] = ` ### Table of Contents -- [foo](#foo) - - [Parameters](#parameters) -- [bar](#bar) - - [Parameters](#parameters-1) +* [foo](#foo) + * [Parameters](#parameters) +* [bar](#bar) + * [Parameters](#parameters-1) ## foo @@ -92,7 +92,7 @@ A function with documentation. ### Parameters -- \`a\` {string} blah +* \`a\` {string} blah Returns **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** answer @@ -102,7 +102,7 @@ A second function with docs ### Parameters -- \`b\` +* \`b\` # Another section " diff --git a/__tests__/__snapshots__/test.js.snap b/__tests__/__snapshots__/test.js.snap index e59c04741..139870905 100644 --- a/__tests__/__snapshots__/test.js.snap +++ b/__tests__/__snapshots__/test.js.snap @@ -459,7 +459,7 @@ This is my class, a demo thing. ### Properties -- \`howMany\` **[number][1]** how many things it contains +* \`howMany\` **[number][1]** how many things it contains ### getFoo @@ -467,7 +467,7 @@ Get the number 42 #### Parameters -- \`getIt\` **[boolean][2]** whether to get the number +* \`getIt\` **[boolean][2]** whether to get the number Returns **[number][1]** forty-two @@ -481,7 +481,6 @@ Returns **[undefined][3]** does not return anything. World - [1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number [2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean @@ -497,7 +496,6 @@ exports[`config with nested sections 1`] = ` - ### third This function is third @@ -514,12 +512,10 @@ forgot a memberof here... sure hope that doesn't crash anything! Contains a subsection! - ### Charlie Second is in here - #### second This class has some members @@ -530,7 +526,7 @@ second::foo ###### Parameters -- \`pork\` +* \`pork\` ##### bar @@ -538,8 +534,8 @@ second::bar ###### Parameters -- \`beans\` -- \`rice\` +* \`beans\` +* \`rice\` ## AClass @@ -991,8 +987,8 @@ myFoo.foo(42); } \`\`\` -- Throws **[Error][1]** if you give it something -- Throws **[TypeError][2]** if you give it something else +* Throws **[Error][1]** if you give it something +* Throws **[TypeError][2]** if you give it something else Returns **[Number][3]** numberone @@ -2830,15 +2826,15 @@ exports[`outputs boolean-literal-type.input.js markdown 1`] = ` ### Table of Contents -- [f][1] - - [Parameters][2] +* [f][1] + * [Parameters][2] ## f ### Parameters -- \`t\` **\`true\`** -- \`f\` **\`false\`** +* \`t\` **\`true\`** +* \`f\` **\`false\`** Returns **\\\\[\`true\`, \`false\`]** @@ -2941,6 +2937,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -3368,11 +3365,11 @@ exports[`outputs class.input.js markdown 1`] = ` ### Table of Contents -- [MyClass][1] - - [Properties][2] - - [getFoo][3] - - [Parameters][4] - - [getUndefined][5] +* [MyClass][1] + * [Properties][2] + * [getFoo][3] + * [Parameters][4] + * [getUndefined][5] ## MyClass @@ -3380,7 +3377,7 @@ This is my class, a demo thing. ### Properties -- \`howMany\` **[number][6]** how many things it contains +* \`howMany\` **[number][6]** how many things it contains ### getFoo @@ -3388,7 +3385,7 @@ Get the number 42 #### Parameters -- \`getIt\` **[boolean][7]** whether to get the number +* \`getIt\` **[boolean][7]** whether to get the number Returns **[number][6]** forty-two @@ -3503,6 +3500,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -3585,6 +3583,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -3855,8 +3854,8 @@ exports[`outputs default-export-function.input.js markdown 1`] = ` ### Table of Contents -- [default-export-function.input][1] -- [bar][2] +* [default-export-function.input][1] +* [bar][2] ## default-export-function.input @@ -5722,50 +5721,50 @@ exports[`outputs document-exported.input.js markdown 1`] = ` ### Table of Contents -- [x][1] - - [Parameters][2] -- [z][3] - - [zMethod][4] -- [Class][5] - - [Parameters][6] - - [classMethod][7] - - [classGetter][8] - - [classSetter][9] - - [Parameters][10] - - [staticMethod][11] - - [staticGetter][12] - - [staticSetter][13] - - [Parameters][14] -- [T5][15] -- [y2Default][16] -- [y4][17] - - [Parameters][18] -- [object][19] - - [method][20] - - [getter][21] - - [setter][22] - - [Parameters][23] - - [prop][24] - - [func][25] -- [f1][26] -- [f3][27] -- [T][28] -- [T2][29] -- [T4][30] -- [f4][31] - - [Parameters][32] -- [o1][33] - - [om1][34] -- [f5][35] - - [Parameters][36] -- [o2][37] - - [om2][38] +* [x][1] + * [Parameters][2] +* [z][3] + * [zMethod][4] +* [Class][5] + * [Parameters][6] + * [classMethod][7] + * [classGetter][8] + * [classSetter][9] + * [Parameters][10] + * [staticMethod][11] + * [staticGetter][12] + * [staticSetter][13] + * [Parameters][14] +* [T5][15] +* [y2Default][16] +* [y4][17] + * [Parameters][18] +* [object][19] + * [method][20] + * [getter][21] + * [setter][22] + * [Parameters][23] + * [prop][24] + * [func][25] +* [f1][26] +* [f3][27] +* [T][28] +* [T2][29] +* [T4][30] +* [f4][31] + * [Parameters][32] +* [o1][33] + * [om1][34] +* [f5][35] + * [Parameters][36] +* [o2][37] + * [om2][38] ## x ### Parameters -- \`yparam\` +* \`yparam\` ## z @@ -5775,7 +5774,7 @@ exports[`outputs document-exported.input.js markdown 1`] = ` ### Parameters -- \`a\` **[string][39]** +* \`a\` **[string][39]** ### classMethod @@ -5785,7 +5784,7 @@ exports[`outputs document-exported.input.js markdown 1`] = ` #### Parameters -- \`v\` +* \`v\` ### staticMethod @@ -5795,7 +5794,7 @@ exports[`outputs document-exported.input.js markdown 1`] = ` #### Parameters -- \`v\` +* \`v\` ## T5 @@ -5809,7 +5808,7 @@ Description of y3 ### Parameters -- \`p\` **[number][41]** +* \`p\` **[number][41]** Returns **void** @@ -5823,7 +5822,7 @@ Returns **void** #### Parameters -- \`v\` +* \`v\` ### prop @@ -5849,7 +5848,7 @@ Type: [string][39] ### Parameters -- \`x\` **X** +* \`x\` **X** ## o1 @@ -5861,7 +5860,7 @@ f5 comment ### Parameters -- \`y\` **Y** +* \`y\` **Y** ## o2 @@ -6004,6 +6003,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -6088,6 +6088,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -6156,6 +6157,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -6224,6 +6226,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -6337,6 +6340,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -6437,6 +6441,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -6624,6 +6629,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -6710,6 +6716,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -6875,8 +6882,8 @@ exports[`outputs document-exported-export-default-object.input.js markdown 1`] = ### Table of Contents -- [document-exported-export-default-object.input][1] -- [x][2] +* [document-exported-export-default-object.input][1] +* [x][2] ## document-exported-export-default-object.input @@ -6981,7 +6988,7 @@ exports[`outputs document-exported-export-default-value.input.js markdown 1`] = ### Table of Contents -- [document-exported-export-default-value.input][1] +* [document-exported-export-default-value.input][1] ## document-exported-export-default-value.input @@ -9043,40 +9050,40 @@ exports[`outputs es6.input.js markdown 1`] = ` ### Table of Contents -- [destructure][1] - - [Parameters][2] -- [destructure2][3] - - [Parameters][4] - - [Examples][5] -- [multiply][6] - - [Parameters][7] -- [Sink][8] - - [Parameters][9] - - [Examples][10] - - [staticProp][11] - - [empty][12] - - [classprop][13] - - [Parameters][14] - - [aGetter][15] - - [hello][16] -- [makeABasket][17] -- [makeASink][18] -- [functionWithRest][19] - - [Parameters][20] -- [functionWithRestAndType][21] - - [Parameters][22] -- [foo][23] -- [es6.input][24] -- [veryImportantTransform][25] - - [Parameters][26] -- [iAmProtected][27] -- [iAmPublic][28] -- [execute][29] -- [isArrayEqualWith][30] - - [Parameters][31] -- [paramWithMemberType][32] - - [Parameters][33] -- [A][34] +* [destructure][1] + * [Parameters][2] +* [destructure2][3] + * [Parameters][4] + * [Examples][5] +* [multiply][6] + * [Parameters][7] +* [Sink][8] + * [Parameters][9] + * [Examples][10] + * [staticProp][11] + * [empty][12] + * [classprop][13] + * [Parameters][14] + * [aGetter][15] + * [hello][16] +* [makeABasket][17] +* [makeASink][18] +* [functionWithRest][19] + * [Parameters][20] +* [functionWithRestAndType][21] + * [Parameters][22] +* [foo][23] +* [es6.input][24] +* [veryImportantTransform][25] + * [Parameters][26] +* [iAmProtected][27] +* [iAmPublic][28] +* [execute][29] +* [isArrayEqualWith][30] + * [Parameters][31] +* [paramWithMemberType][32] + * [Parameters][33] +* [A][34] ## destructure @@ -9085,11 +9092,11 @@ have any parameter descriptions. ### Parameters -- \`$0\` **[Object][35]** (optional, default \`{}\`) +* \`$0\` **[Object][35]** (optional, default \`{}\`) - - \`$0.phoneNumbers\` (optional, default \`[]\`) - - \`$0.emailAddresses\` (optional, default \`[]\`) - - \`$0.params\` **...any** + * \`$0.phoneNumbers\` (optional, default \`[]\`) + * \`$0.emailAddresses\` (optional, default \`[]\`) + * \`$0.params\` **...any** ## destructure2 @@ -9097,12 +9104,12 @@ Similar, but with an array ### Parameters -- \`$0\` **[Array][36]** +* \`$0\` **[Array][36]** - - \`$0.0\` - - \`$0.1\` - - \`$0.2\` - - \`$0.3\` + * \`$0.0\` + * \`$0.1\` + * \`$0.2\` + * \`$0.3\` ### Examples @@ -9116,8 +9123,8 @@ This function returns the number one. ### Parameters -- \`a\` **[Array][36]<[Number][37]>** an array of numbers -- \`b\` +* \`a\` **[Array][36]<[Number][37]>** an array of numbers +* \`b\` Returns **[Number][37]** numberone @@ -9127,8 +9134,8 @@ This is a sink ### Parameters -- \`height\` **[number][37]** the height of the thing -- \`width\` **[number][37]** the width of the thing +* \`height\` **[number][37]** the height of the thing +* \`width\` **[number][37]** the width of the thing ### Examples @@ -9154,7 +9161,7 @@ This uses the class property transform #### Parameters -- \`a\` **[number][37]** +* \`a\` **[number][37]** Returns **[string][38]** @@ -9186,7 +9193,7 @@ This function takes rest params ### Parameters -- \`someParams\` **...any** +* \`someParams\` **...any** ## functionWithRestAndType @@ -9194,7 +9201,7 @@ So does this one, with types ### Parameters -- \`someParams\` **...[number][37]** +* \`someParams\` **...[number][37]** ## foo @@ -9212,7 +9219,7 @@ This tests our support of optional parameters in ES6 ### Parameters -- \`foo\` (optional, default \`'bar'\`) +* \`foo\` (optional, default \`'bar'\`) ## iAmProtected @@ -9232,9 +9239,9 @@ Regression check for #498 ### Parameters -- \`array1\` **[Array][36]<T>** -- \`array2\` **[Array][36]<T>** -- \`compareFunction\` **function (a: T, b: T): [boolean][41]** (optional, default \`(a:T,b:T):boolean=>a===b\`) +* \`array1\` **[Array][36]\\\\** +* \`array2\` **[Array][36]\\\\** +* \`compareFunction\` **function (a: T, b: T): [boolean][41]** (optional, default \`(a:T,b:T):boolean=>a===b\`) Returns **[boolean][41]** @@ -9244,7 +9251,7 @@ Regression check for #749 ### Parameters -- \`a\` **atype.property** +* \`a\` **atype.property** Returns **[boolean][41]** @@ -9544,6 +9551,7 @@ have any parameter descriptions.", }, ], "ordered": false, + "spread": false, "type": "list", }, ], @@ -9551,6 +9559,7 @@ have any parameter descriptions.", }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -9711,6 +9720,7 @@ have any parameter descriptions.", }, ], "ordered": false, + "spread": false, "type": "list", }, ], @@ -9718,6 +9728,7 @@ have any parameter descriptions.", }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -9856,6 +9867,7 @@ have any parameter descriptions.", }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -10023,6 +10035,7 @@ have any parameter descriptions.", }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -10153,6 +10166,7 @@ class A { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -10429,6 +10443,7 @@ It takes a ", }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -10506,6 +10521,7 @@ It takes a ", }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -10656,6 +10672,7 @@ It takes a ", }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -10935,6 +10952,7 @@ It takes a ", }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -11030,6 +11048,7 @@ It takes a ", }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -11483,12 +11502,12 @@ exports[`outputs es6-class.input.js markdown 1`] = ` ### Table of Contents -- [Foo][1] -- [Bar][2] - - [Parameters][3] - - [bar][4] -- [Baz][5] - - [Parameters][6] +* [Foo][1] +* [Bar][2] + * [Parameters][3] + * [bar][4] +* [Baz][5] + * [Parameters][6] ## Foo @@ -11502,7 +11521,7 @@ Does nothing. This is from issue #556 ### Parameters -- \`str\` **[string][7]** +* \`str\` **[string][7]** ### bar @@ -11516,8 +11535,8 @@ This class has fully inferred constructor parameters. ### Parameters -- \`n\` **[number][8]** -- \`l\` **[Array][9]<[string][7]>** +* \`n\` **[number][8]** +* \`l\` **[Array][9]<[string][7]>** [1]: #foo @@ -11654,6 +11673,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -11823,6 +11843,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -12105,9 +12126,9 @@ exports[`outputs es6-class-property.input.js markdown 1`] = ` ### Table of Contents -- [Issue906][1] - - [readWriteProp][2] - - [readOnlyProp][3] +* [Issue906][1] + * [readWriteProp][2] + * [readOnlyProp][3] ## Issue906 @@ -12334,14 +12355,14 @@ exports[`outputs es6-default2.input.js markdown 1`] = ` ### Table of Contents -- [es6-default2.input][1] - - [Parameters][2] +* [es6-default2.input][1] + * [Parameters][2] ## es6-default2.input ### Parameters -- \`thisIsTheArgument\` +* \`thisIsTheArgument\` [1]: #es6-default2input @@ -12402,6 +12423,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, ], @@ -12685,10 +12707,10 @@ exports[`outputs es6-import.input.js markdown 1`] = ` ### Table of Contents -- [multiplyTwice][1] - - [Parameters][2] -- [es6-ext][3] -- [simple.input][4] +* [multiplyTwice][1] + * [Parameters][2] +* [es6-ext][3] +* [simple.input][4] ## multiplyTwice @@ -12696,7 +12718,7 @@ This function returns the number one. ### Parameters -- \`a\` +* \`a\` Returns **[Number][5]** numberone @@ -12784,6 +12806,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -13073,8 +13096,8 @@ exports[`outputs event.input.js markdown 1`] = ` ### Table of Contents -- [Map#mousemove][1] - - [Properties][2] +* [Map#mousemove][1] + * [Properties][2] ## Map#mousemove @@ -13084,8 +13107,8 @@ Type: [Object][3] ### Properties -- \`point\` **Point** the pixel location of the event -- \`originalEvent\` **[Event][4]** the original DOM event +* \`point\` **Point** the pixel location of the event +* \`originalEvent\` **[Event][4]** the original DOM event [1]: #mapmousemove @@ -13244,6 +13267,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -13395,8 +13419,8 @@ exports[`outputs example-caption.input.js markdown 1`] = ` ### Table of Contents -- [foo][1] - - [Examples][2] +* [foo][1] + * [Examples][2] ## foo @@ -13406,7 +13430,6 @@ This function returns the number one. demonstrates how to run foo - \`\`\`javascript foo(1); \`\`\` @@ -13614,7 +13637,7 @@ exports[`outputs external.input.js markdown 1`] = ` ### Table of Contents -- [foo][1] +* [foo][1] ## foo @@ -13919,10 +13942,10 @@ exports[`outputs factory.input.js markdown 1`] = ` ### Table of Contents -- [area][1] -- [area][2] -- [data][3] - - [Parameters][4] +* [area][1] +* [area][2] +* [data][3] + * [Parameters][4] ## area @@ -13938,7 +13961,7 @@ Sets the chart data. ### Parameters -- \`_\` +* \`_\` [1]: #area @@ -14081,6 +14104,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -14168,7 +14192,7 @@ exports[`outputs flow-exported-opaque-type.input.js markdown 1`] = ` ### Table of Contents -- [MyOpaqueType][1] +* [MyOpaqueType][1] ## MyOpaqueType @@ -14379,8 +14403,8 @@ exports[`outputs flow-optional-chaining.input.js markdown 1`] = ` ### Table of Contents -- [foo][1] -- [value][2] +* [foo][1] +* [value][2] ## foo @@ -14974,11 +14998,11 @@ exports[`outputs flow-unnamed-params.input.js markdown 1`] = ` ### Table of Contents -- [x][1] -- [x2][2] -- [T][3] -- [T2][4] -- [T3][5] +* [x][1] +* [x2][2] +* [T][3] +* [T2][4] +* [T3][5] ## x @@ -14996,13 +15020,13 @@ Type: function (a: [T][6]): [string][7] T -Type: function ([Array][8]<[string][7]>): {num: [number][9]} +Type: function ([Array][8]<[string][7]>): {num: [number][9]} ## T2 T2 -Type: function (a: [Array][8]<[string][7]>): {num: [number][9]} +Type: function (a: [Array][8]<[string][7]>): {num: [number][9]} ## T3 @@ -15633,8 +15657,8 @@ exports[`outputs infer-private.input.js markdown 1`] = ` ### Table of Contents -- [C][1] - - [m][2] +* [C][1] + * [m][2] ## C @@ -15842,8 +15866,8 @@ exports[`outputs inheritance.input.js markdown 1`] = ` ### Table of Contents -- [SpecialArray][1] -- [Foo][2] +* [SpecialArray][1] +* [Foo][2] ## SpecialArray @@ -16260,10 +16284,10 @@ exports[`outputs inline-link.input.js markdown 1`] = ` ### Table of Contents -- [addOne][1] - - [Parameters][2] -- [inline-link.input][3] - - [Parameters][4] +* [addOne][1] + * [Parameters][2] +* [inline-link.input][3] + * [Parameters][4] ## addOne @@ -16271,7 +16295,7 @@ Adds one to a number ### Parameters -- \`a\` **[number][5]** the input +* \`a\` **[number][5]** the input Returns **[number][5]** the output @@ -16286,7 +16310,7 @@ This link refers to nothing: [nothing][7] ### Parameters -- \`a\` **[number][5]** the input +* \`a\` **[number][5]** the input Returns **[number][5]** numberone @@ -16393,6 +16417,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -16577,6 +16602,7 @@ and ", }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -16886,9 +16912,9 @@ exports[`outputs interface.input.js markdown 1`] = ` ### Table of Contents -- [Foo][1] - - [prop1][2] - - [prop2][3] +* [Foo][1] + * [prop1][2] + * [prop2][3] ## Foo @@ -17143,7 +17169,7 @@ exports[`outputs internal.input.js markdown 1`] = ` ### Table of Contents -- [foo][1] +* [foo][1] ## foo @@ -17641,12 +17667,12 @@ exports[`outputs lends.input.js markdown 1`] = ` ### Table of Contents -- [TheClass][1] - - [my-field][2] - - [foo][3] - - [Parameters][4] - - [bar][5] - - [Parameters][6] +* [TheClass][1] + * [my-field][2] + * [foo][3] + * [Parameters][4] + * [bar][5] + * [Parameters][6] ## TheClass @@ -17664,7 +17690,7 @@ My neat function #### Parameters -- \`word\` **[string][7]** your word +* \`word\` **[string][7]** your word Returns **[string][7]** your word but one better @@ -17674,7 +17700,7 @@ My neat function #### Parameters -- \`word\` **[string][7]** your word +* \`word\` **[string][7]** your word Returns **[string][7]** your word but one better @@ -17837,6 +17863,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -17957,6 +17984,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -18230,22 +18258,22 @@ exports[`outputs literal_types.input.js markdown 1`] = ` ### Table of Contents -- [f][1] - - [Parameters][2] -- [g][3] - - [Parameters][4] +* [f][1] + * [Parameters][2] +* [g][3] + * [Parameters][4] ## f ### Parameters -- \`x\` **(\`\\"a\\"\` \\\\| \`\\"b\\"\` \\\\| \`\\"\\"\` \\\\| \`0\` \\\\| \`-42\` \\\\| \`3.14\`)** +* \`x\` **(\`\\"a\\"\` | \`\\"b\\"\` | \`\\"\\"\` | \`0\` | \`-42\` | \`3.14\`)** ## g ### Parameters -- \`x\` **(\`\\"a\\"\` \\\\| \`\\"b\\"\` \\\\| \`\\"\\"\` \\\\| \`0\` \\\\| \`-42\` \\\\| \`3.14\`)** +* \`x\` **(\`\\"a\\"\` | \`\\"b\\"\` | \`\\"\\"\` | \`0\` | \`-42\` | \`3.14\`)** [1]: #f @@ -18367,6 +18395,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -18472,6 +18501,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, ], @@ -18818,10 +18848,10 @@ exports[`outputs memberedclass.input.js markdown 1`] = ` ### Table of Contents -- [MyClass][1] - - [getFoo][2] - - [Parameters][3] - - [getUndefined][4] +* [MyClass][1] + * [getFoo][2] + * [Parameters][3] + * [getUndefined][4] ## MyClass @@ -18833,7 +18863,7 @@ Get the number 42 #### Parameters -- \`getIt\` **[boolean][5]** whether to get the number +* \`getIt\` **[boolean][5]** whether to get the number Returns **[number][6]** forty-two @@ -18965,6 +18995,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -19229,8 +19260,8 @@ exports[`outputs merge-infered-type.input.js markdown 1`] = ` ### Table of Contents -- [addFive][1] - - [Parameters][2] +* [addFive][1] + * [Parameters][2] ## addFive @@ -19238,7 +19269,7 @@ Add five to \`x\`. ### Parameters -- \`x\` **[number][3]** The number to add five to. +* \`x\` **[number][3]** The number to add five to. Returns **[number][3]** x plus five. @@ -19345,6 +19376,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -19576,12 +19608,11 @@ exports[`outputs meta.input.js markdown 1`] = ` ### Table of Contents -- [meta.input][1] +* [meta.input][1] ## meta.input -- **See**: [markdown link][2] - +* **See**: [markdown link][2] This function returns the number one. @@ -19589,11 +19620,10 @@ Returns **[number][3]** numberone **Meta** -- **version**: 1.0.0 -- **since**: 2.0.0 -- **copyright**: Tom MacWright - -- **license**: BSD +* **version**: 1.0.0 +* **since**: 2.0.0 +* **copyright**: Tom MacWright +* **license**: BSD [1]: #metainput @@ -19668,6 +19698,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -19848,6 +19879,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -20111,10 +20143,10 @@ exports[`outputs multisignature.input.js markdown 1`] = ` ### Table of Contents -- [getTheTime][1] - - [Parameters][2] -- [getTheTime][3] - - [Parameters][4] +* [getTheTime][1] + * [Parameters][2] +* [getTheTime][3] + * [Parameters][4] ## getTheTime @@ -20122,7 +20154,7 @@ Get the time ### Parameters -- \`time\` +* \`time\` Returns **[Date][5]** the current date @@ -20132,7 +20164,7 @@ Set the time ### Parameters -- \`time\` **[Date][5]** the current time +* \`time\` **[Date][5]** the current time Returns **[undefined][6]** nothing @@ -20212,6 +20244,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -20332,6 +20365,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -20660,8 +20694,8 @@ exports[`outputs nearby_params.input.js markdown 1`] = ` ### Table of Contents -- [sessions.create][1] - - [Parameters][2] +* [sessions.create][1] + * [Parameters][2] ## sessions.create @@ -20669,11 +20703,11 @@ Attempt to establish a cookie-based session in exchange for credentials. ### Parameters -- \`credentials\` **[object][3]** +* \`credentials\` **[object][3]** - - \`credentials.name\` **[string][4]** Login username. Also accepted as \`username\` or \`email\`. - - \`credentials.password\` **[string][4]** Login password -- \`callback\` **[function][5]?** Gets passed \`(err, { success:Boolean })\`. + * \`credentials.name\` **[string][4]** Login username. Also accepted as \`username\` or \`email\`. + * \`credentials.password\` **[string][4]** Login password +* \`callback\` **[function][5]?** Gets passed \`(err, { success:Boolean })\`. Returns **[Promise][6]** promise, to be resolved on success or rejected on failure @@ -20878,6 +20912,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, ], @@ -20944,6 +20979,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -21180,8 +21216,8 @@ exports[`outputs nest_events.input.js markdown 1`] = ` ### Table of Contents -- [Klass][1] - - [bar][2] +* [Klass][1] + * [bar][2] ## Klass @@ -21753,38 +21789,38 @@ exports[`outputs nest_params.input.js markdown 1`] = ` ### Table of Contents -- [foo][1] - - [Parameters][2] -- [foo][3] - - [Parameters][4] - - [Properties][5] +* [foo][1] + * [Parameters][2] +* [foo][3] + * [Parameters][4] + * [Properties][5] ## foo ### Parameters -- \`employees\` **[Array][6]<[Object][7]>** The employees who are responsible for the project. +* \`employees\` **[Array][6]<[Object][7]>** The employees who are responsible for the project. - - \`employees[].name\` **[string][8]** The name of an employee. - - \`employees[].department\` **[string][8]** The employee's department. -- \`type\` **[string][8]** The employee's type. (optional, default \`minion\`) + * \`employees[].name\` **[string][8]** The name of an employee. + * \`employees[].department\` **[string][8]** The employee's department. +* \`type\` **[string][8]** The employee's type. (optional, default \`minion\`) ## foo ### Parameters -- \`options\` **[Object][7]** some options +* \`options\` **[Object][7]** some options - - \`options.much\` **[number][9]** how much -- \`bar\` **[number][9]** something else + * \`options.much\` **[number][9]** how much +* \`bar\` **[number][9]** something else ### Properties -- \`theTime\` **[Object][7]** the current time +* \`theTime\` **[Object][7]** the current time - - \`theTime.hours\` **[number][9]** - - \`theTime.minutes\` **[number][9]** - - \`theTime.seconds\` **[number][9]** + * \`theTime.hours\` **[number][9]** + * \`theTime.minutes\` **[number][9]** + * \`theTime.seconds\` **[number][9]** Returns **[Object][7]** foo something else @@ -21998,6 +22034,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, ], @@ -22069,6 +22106,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -22188,6 +22226,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, ], @@ -22242,6 +22281,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -22418,6 +22458,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, ], @@ -22425,6 +22466,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -22606,15 +22648,15 @@ exports[`outputs newline-in-description.input.js markdown 1`] = ` ### Table of Contents -- [Parameters][1] +* [Parameters][1] -## +## A function. ### Parameters -- \`a\` **[Number][2]** The input to the function. +* \`a\` **[Number][2]** The input to the function. I should be able to continue the description on a new line, and have it still work in the markdown table. @@ -22713,6 +22755,7 @@ still work in the markdown table.", }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -22820,15 +22863,15 @@ exports[`outputs no-name.input.js markdown 1`] = ` ### Table of Contents -- [Parameters][1] +* [Parameters][1] -## +## Set the time ### Parameters -- \`bar\` **[number][2]** +* \`bar\` **[number][2]** [1]: #parameters @@ -22914,6 +22957,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -23012,15 +23056,15 @@ exports[`outputs optional-record-field-type.input.js markdown 1`] = ` ### Table of Contents -- [Record][1] - - [Properties][2] +* [Record][1] + * [Properties][2] ## Record ### Properties -- \`opt\` **[number][3]?** -- \`req\` **[string][4]** +* \`opt\` **[number][3]?** +* \`req\` **[string][4]** [1]: #record @@ -23143,6 +23187,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -24819,29 +24864,29 @@ exports[`outputs params.input.js markdown 1`] = ` ### Table of Contents -- [addThem][1] - - [Parameters][2] -- [fishesAndFoxes][3] - - [Parameters][4] -- [withDefault][5] - - [Parameters][6] -- [Foo][7] - - [method][8] - - [Parameters][9] -- [TraditionalObject][10] - - [traditionalMethod][11] - - [Parameters][12] -- [Address6][13] - - [Parameters][14] - - [Examples][15] -- [GeoJSONSource][16] - - [Parameters][17] -- [myfunc][18] - - [Parameters][19] -- [foo][20] - - [Parameters][21] -- [rotate][22] - - [Parameters][23] +* [addThem][1] + * [Parameters][2] +* [fishesAndFoxes][3] + * [Parameters][4] +* [withDefault][5] + * [Parameters][6] +* [Foo][7] + * [method][8] + * [Parameters][9] +* [TraditionalObject][10] + * [traditionalMethod][11] + * [Parameters][12] +* [Address6][13] + * [Parameters][14] + * [Examples][15] +* [GeoJSONSource][16] + * [Parameters][17] +* [myfunc][18] + * [Parameters][19] +* [foo][20] + * [Parameters][21] +* [rotate][22] + * [Parameters][23] ## addThem @@ -24849,14 +24894,14 @@ This function returns the number one. ### Parameters -- \`a\` -- \`b\` **[number][24]** the second param -- \`c\` -- \`$3\` **[Object][25]** +* \`a\` +* \`b\` **[number][24]** the second param +* \`c\` +* \`$3\` **[Object][25]** - - \`$3.d\` - - \`$3.e\` - - \`$3.f\` + * \`$3.d\` + * \`$3.e\` + * \`$3.f\` ## fishesAndFoxes @@ -24864,10 +24909,10 @@ This method has partially inferred params ### Parameters -- \`options\` **[Object][25]** +* \`options\` **[Object][25]** - - \`options.fishes\` **[String][26]** number of kinds of fish - - \`options.foxes\` + * \`options.fishes\` **[String][26]** number of kinds of fish + * \`options.foxes\` ## withDefault @@ -24875,7 +24920,7 @@ This method has a type in the description and a default in the code ### Parameters -- \`x\` **[number][24]** (optional, default \`2\`) +* \`x\` **[number][24]** (optional, default \`2\`) ## Foo @@ -24887,7 +24932,7 @@ The method #### Parameters -- \`x\` **[number][24]** Param to method +* \`x\` **[number][24]** Param to method ## TraditionalObject @@ -24899,7 +24944,7 @@ This method should acquire the param x #### Parameters -- \`x\` +* \`x\` ## Address6 @@ -24909,10 +24954,10 @@ This tests our support of optional parameters ### Parameters -- \`address\` **[string][26]** An IPv6 address string -- \`groups\` **[number][24]** How many octets to parse (optional, default \`8\`) -- \`third\` **[number][24]?** A third argument -- \`foo\` **[Array][27]** to properly be parsed (optional, default \`[1]\`) +* \`address\` **[string][26]** An IPv6 address string +* \`groups\` **[number][24]** How many octets to parse (optional, default \`8\`) +* \`third\` **[number][24]?** A third argument +* \`foo\` **[Array][27]** to properly be parsed (optional, default \`[1]\`) ### Examples @@ -24928,13 +24973,13 @@ This tests our support of nested parameters ### Parameters -- \`options\` **[Object][25]?** optional options +* \`options\` **[Object][25]?** optional options - - \`options.data\` **([Object][25] \\\\| [string][26])** A GeoJSON data object or URL to it. + * \`options.data\` **([Object][25] | [string][26])** A GeoJSON data object or URL to it. The latter is preferable in case of large GeoJSON files. - - \`options.maxzoom\` **[number][24]** Maximum zoom to preserve detail at. (optional, default \`14\`) - - \`options.buffer\` **[number][24]?** Tile buffer on each side. - - \`options.tolerance\` **[number][24]?** Simplification tolerance (higher means simpler). + * \`options.maxzoom\` **[number][24]** Maximum zoom to preserve detail at. (optional, default \`14\`) + * \`options.buffer\` **[number][24]?** Tile buffer on each side. + * \`options.tolerance\` **[number][24]?** Simplification tolerance (higher means simpler). ## myfunc @@ -24943,7 +24988,7 @@ values specified in code. ### Parameters -- \`x\` **[number][24]** an argument (optional, default \`123\`) +* \`x\` **[number][24]** an argument (optional, default \`123\`) Returns **[number][24]** some @@ -24954,7 +24999,7 @@ or any type information we could infer from annotations. ### Parameters -- \`address\` An IPv6 address string +* \`address\` An IPv6 address string ## rotate @@ -24963,12 +25008,12 @@ iterator destructure (RestElement) ### Parameters -- \`input\` **[Array][27]** +* \`input\` **[Array][27]** - - \`input.0\` **any** head of iterator - - \`input.xs\` **...any** body of iterator + * \`input.0\` **any** head of iterator + * \`input.xs\` **...any** body of iterator -Returns **[Array][27]<any>** rotated such that the last element was the first +Returns **[Array][27]\\\\** rotated such that the last element was the first [1]: #addthem @@ -25260,6 +25305,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, ], @@ -25267,6 +25313,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -25408,6 +25455,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, ], @@ -25415,6 +25463,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -25505,6 +25554,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -25606,6 +25656,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -25682,6 +25733,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -25952,6 +26004,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -26298,6 +26351,7 @@ The latter is preferable in case of large GeoJSON files.", }, ], "ordered": false, + "spread": false, "type": "list", }, ], @@ -26305,6 +26359,7 @@ The latter is preferable in case of large GeoJSON files.", }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -26405,6 +26460,7 @@ values specified in code.", }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -26510,6 +26566,7 @@ or any type information we could infer from annotations.", }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -26667,6 +26724,7 @@ iterator destructure (RestElement)", }, ], "ordered": false, + "spread": false, "type": "list", }, ], @@ -26674,6 +26732,7 @@ iterator destructure (RestElement)", }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -26831,7 +26890,7 @@ exports[`outputs react-jsx.input.js markdown 1`] = ` ### Table of Contents -- [apples][1] +* [apples][1] ## apples @@ -27487,16 +27546,16 @@ exports[`outputs sections.input.js markdown 1`] = ` ### Table of Contents -- [first][1] -- [first][2] -- [AClass][3] - - [second][4] -- [second][5] - - [foo][6] - - [Parameters][7] - - [bar][8] - - [Parameters][9] -- [third][10] +* [first][1] +* [first][2] +* [AClass][3] + * [second][4] +* [second][5] + * [foo][6] + * [Parameters][7] + * [bar][8] + * [Parameters][9] +* [third][10] ## first @@ -27523,7 +27582,7 @@ second::foo #### Parameters -- \`pork\` +* \`pork\` ### bar @@ -27531,8 +27590,8 @@ second::bar #### Parameters -- \`beans\` -- \`rice\` +* \`beans\` +* \`rice\` ## third @@ -27709,6 +27768,7 @@ that doesn't crash anything!", }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -27788,6 +27848,7 @@ that doesn't crash anything!", }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -27922,7 +27983,7 @@ exports[`outputs simple.input.js markdown 1`] = ` ### Table of Contents -- [simple.input][1] +* [simple.input][1] ## simple.input @@ -28307,10 +28368,10 @@ exports[`outputs simple-callback.input.js markdown 1`] = ` ### Table of Contents -- [takesSimpleCallback][1] - - [Parameters][2] -- [simpleCallback][3] - - [Parameters][4] +* [takesSimpleCallback][1] + * [Parameters][2] +* [simpleCallback][3] + * [Parameters][4] ## takesSimpleCallback @@ -28319,8 +28380,8 @@ plus 3. ### Parameters -- \`n\` **[Number][5]** The number. -- \`cb\` **[simpleCallback][6]** The callback. +* \`n\` **[Number][5]** The number. +* \`cb\` **[simpleCallback][6]** The callback. ## simpleCallback @@ -28330,8 +28391,8 @@ Type: [Function][7] ### Parameters -- \`err\` **[Error][8]?** The error. -- \`n\` **[Number][5]** The number. +* \`err\` **[Error][8]?** The error. +* \`n\` **[Number][5]** The number. [1]: #takessimplecallback @@ -28486,6 +28547,7 @@ plus 3.", }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -28639,6 +28701,7 @@ plus 3.", }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -28778,7 +28841,7 @@ exports[`outputs simple-hashbang.input.js markdown 1`] = ` ### Table of Contents -- [simple-hashbang.input][1] +* [simple-hashbang.input][1] ## simple-hashbang.input @@ -29083,9 +29146,9 @@ exports[`outputs simple-two.input.js markdown 1`] = ` ### Table of Contents -- [returnTwo][1] - - [Parameters][2] - - [Examples][3] +* [returnTwo][1] + * [Parameters][2] + * [Examples][3] ## returnTwo @@ -29093,7 +29156,7 @@ This function returns the number plus two. ### Parameters -- \`a\` **[Number][4]** the number +* \`a\` **[Number][4]** the number ### Examples @@ -29201,6 +29264,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -29972,18 +30036,18 @@ exports[`outputs sort-order-alpha.input.js markdown 1`] = ` ### Table of Contents -- [C][1] - - [A][2] - - [a][3] - - [B][4] - - [b][5] -- [D][6] - - [A][7] - - [a][8] - - [B][9] - - [b][10] -- [a][11] -- [b][12] +* [C][1] + * [A][2] + * [a][3] + * [B][4] + * [b][5] +* [D][6] + * [A][7] + * [a][8] + * [B][9] + * [b][10] +* [a][11] +* [b][12] ## C @@ -30310,8 +30374,8 @@ exports[`outputs string-literal-key.input.js markdown 1`] = ` ### Table of Contents -- [MyContainerObject][1] -- [foo][2] +* [MyContainerObject][1] +* [foo][2] ## MyContainerObject @@ -30713,13 +30777,13 @@ exports[`outputs this-class.input.js markdown 1`] = ` ### Table of Contents -- [bookshelf][1] -- [Book][2] - - [Parameters][3] - - [title][4] -- [BookShelf][5] - - [Parameters][6] - - [title][7] +* [bookshelf][1] +* [Book][2] + * [Parameters][3] + * [title][4] +* [BookShelf][5] + * [Parameters][6] + * [title][7] ## bookshelf @@ -30727,7 +30791,7 @@ exports[`outputs this-class.input.js markdown 1`] = ` ### Parameters -- \`title\` +* \`title\` ### title @@ -30737,7 +30801,7 @@ The title of the book. ### Parameters -- \`title\` +* \`title\` ### title @@ -30822,6 +30886,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -30889,6 +30954,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -31051,8 +31117,8 @@ exports[`outputs type_application.input.js markdown 1`] = ` ### Table of Contents -- [Address6][1] - - [Parameters][2] +* [Address6][1] + * [Parameters][2] ## Address6 @@ -31060,7 +31126,7 @@ Represents an IPv6 address ### Parameters -- \`address\` **[Array][3]<[string][4]>** An IPv6 address string +* \`address\` **[Array][3]<[string][4]>** An IPv6 address string [1]: #address6 @@ -31178,6 +31244,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { @@ -31278,14 +31345,14 @@ exports[`outputs var-function-param-return.input.js markdown 1`] = ` ### Table of Contents -- [f][1] - - [Parameters][2] +* [f][1] + * [Parameters][2] ## f ### Parameters -- \`x\` **[number][3]** +* \`x\` **[number][3]** Returns **[boolean][4]** @@ -31368,6 +31435,7 @@ Object { }, ], "ordered": false, + "spread": false, "type": "list", }, Object { diff --git a/__tests__/format_type.js b/__tests__/format_type.js index 3b3abdf4e..d9932a960 100644 --- a/__tests__/format_type.js +++ b/__tests__/format_type.js @@ -23,18 +23,18 @@ test('formatType', function () { ['namedType.typeProperty', 'namedType.typeProperty'], [ 'Array|undefined', - '([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array) \\| [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))' + '([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))' ], [ 'Array', - '[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)>' + '[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)>' ], [ 'number!', '[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)!' ], - ["('pre'|'post')", '(`"pre"` \\| `"post"`)'], - ["'pre'|'post'", '(`"pre"` \\| `"post"`)'], + ["('pre'|'post')", '(`"pre"` | `"post"`)'], + ["'pre'|'post'", '(`"pre"` | `"post"`)'], [ 'function(string, boolean)', 'function ([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean))' @@ -88,7 +88,7 @@ test('formatType', function () { parse('@param {' + example[0] + '} a', { sloppy: true }).tags[0].type ) ) - ).toEqual(example[1]); + ).toEqual(example[1] + '\n'); }); expect( @@ -96,7 +96,7 @@ test('formatType', function () { formatType(parse('@param {number} [a=1]', { sloppy: true }).tags[0].type) ) ).toEqual( - '[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?' + '[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)?\n' ); expect( @@ -110,9 +110,9 @@ test('formatType', function () { }).tags[0].type ) ) - ).toEqual('[Foo](FOO)'); + ).toEqual('[Foo](FOO)\n'); - expect(stringify(formatType())).toEqual('any'); + expect(stringify(formatType())).toEqual('any\n'); expect(function () { formatType({}); diff --git a/__tests__/lib/parse.js b/__tests__/lib/parse.js index b9d18842c..9bf05d320 100644 --- a/__tests__/lib/parse.js +++ b/__tests__/lib/parse.js @@ -1,7 +1,10 @@ const parse = require('../../src/parsers/javascript'); -const remark = require('remark'); +const remarkP = require('remark')().parse; +const removePosition = require('../../src/remark-remove-position')(); const visit = require('unist-util-visit'); -const remarkParse = remark().use({ settings: { position: false } }).parse; +const remarkParse = function (str) { + return removePosition(remarkP(str)); +}; function pick(obj, props) { if (Array.isArray(props)) { diff --git a/__tests__/lib/parsers/javascript.js b/__tests__/lib/parsers/javascript.js index a7a4b3eea..25d7baeb5 100644 --- a/__tests__/lib/parsers/javascript.js +++ b/__tests__/lib/parsers/javascript.js @@ -1,6 +1,9 @@ -const remark = require('remark'); +const remarkP = require('remark')().parse; +const removePosition = require('../../../src/remark-remove-position')(); const parse = require('../../../src/parsers/javascript'); -const remarkParse = remark().use({ settings: { position: false } }).parse; +const remarkParse = function (str) { + return removePosition(remarkP(str)); +}; function toComments(source, filename, opts) { source = typeof source === 'string' ? source : '(' + source.toString() + ')'; diff --git a/package.json b/package.json index be4b9a89f..32115900e 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "ini": "^1.3.5", "js-yaml": "^3.10.0", "lodash": "^4.17.10", + "mdast-util-find-and-replace": "^1.1.1", "mdast-util-inject": "^1.1.0", "micromatch": "^3.1.5", "mime": "^2.2.0", @@ -52,8 +53,8 @@ "parse-filepath": "^1.0.2", "pify": "^5.0.0", "read-pkg-up": "^4.0.0", - "remark": "^12.0.0", - "remark-html": "^12.0.0", + "remark": "^13.0.0", + "remark-html": "^13.0.1", "remark-reference-links": "^5.0.0", "remark-toc": "^7.2.0", "resolve": "^1.8.1", diff --git a/src/inline_tokenizer.js b/src/inline_tokenizer.js deleted file mode 100644 index d5f65911a..000000000 --- a/src/inline_tokenizer.js +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Create a tokenizer method for Remark, our Markdown processor, - * that is able to parse JSDoc inline tokens - * - * @private - * @param {string} type the destination type of the parsed objects - * @param {RegExp} regex regular expression for extracting content - * from text - * @returns {Function} tokenizer - */ -function makeTokenizer(type, regex) { - const tokenizer = function (eat, value) { - const match = regex.exec(value); - - if (!match) { - return; - } - - return eat(match[0])({ - type, - url: match[1], - title: null, - jsdoc: true, - children: [ - { - type: 'text', - value: match[2] || match[1] - } - ] - }); - }; - - tokenizer.notInLink = true; - tokenizer.locator = function (value, fromIndex) { - return value.indexOf('{@' + type, fromIndex); - }; - - return tokenizer; -} - -const tokenizeLink = makeTokenizer('link', /^\{@link\s+(.+?)(?:[\s|](.*?))?\}/); -const tokenizeTutorial = makeTokenizer( - 'tutorial', - /^\{@tutorial\s+(.+?)(?:[\s|](.*?))?\}/ -); - -/** - * A remark plugin that installs - * [tokenizers](https://github.com/wooorm/remark/blob/master/doc/remarkplugin.3.md#function-tokenizereat-value-silent) - * and [locators](https://github.com/wooorm/remark/blob/master/doc/remarkplugin.3.md#function-locatorvalue-fromindex) - * for JSDoc inline `{@link}` and `{@tutorial}` tags. - * - * This does not handle the `[text]({@link url})` and `[text]({@tutorial url})` forms of these tags. - * That's a JSDoc misfeature; just use regular markdown syntax instead: `[text](url)`. - * - * @returns {undefined} - */ -module.exports = function (/* options: Object*/) { - const proto = this.Parser.prototype; - proto.inlineTokenizers.tokenizeLink = tokenizeLink; - proto.inlineTokenizers.tokenizeTutorial = tokenizeTutorial; - const methods = proto.inlineMethods; - methods.splice( - methods.indexOf('inlineText'), - 0, - 'tokenizeLink', - 'tokenizeTutorial' - ); -}; diff --git a/src/output/markdown_ast.js b/src/output/markdown_ast.js index ce97ffe8b..f1241bcba 100644 --- a/src/output/markdown_ast.js +++ b/src/output/markdown_ast.js @@ -73,7 +73,7 @@ function buildMarkdownAST(comments, config) { if (params.length === 0) return []; return u( 'list', - { ordered: false }, + { ordered: false, spread: false }, params.map(param => u( 'listItem', @@ -126,7 +126,7 @@ function buildMarkdownAST(comments, config) { function propertyList(properties) { return u( 'list', - { ordered: false }, + { ordered: false, spread: false }, properties.map(property => u( 'listItem', @@ -192,7 +192,7 @@ function buildMarkdownAST(comments, config) { comment.throws.length > 0 && u( 'list', - { ordered: false }, + { ordered: false, spread: false }, comment.throws.map(returns => u('listItem', [ u( @@ -228,7 +228,7 @@ function buildMarkdownAST(comments, config) { sees.length > 0 && u( 'list', - { ordered: false }, + { ordered: false, spread: false }, sees.map(see => u('listItem', [ u( @@ -283,7 +283,7 @@ function buildMarkdownAST(comments, config) { [u('strong', [u('text', 'Meta')])].concat( u( 'list', - { ordered: false }, + { ordered: false, spread: false }, meta.map(tag => { let metaContent; if (tag === 'copyright' || tag === 'deprecated') { diff --git a/src/parse.js b/src/parse.js index 6f6ce2306..653c28387 100644 --- a/src/parse.js +++ b/src/parse.js @@ -1,5 +1,5 @@ const doctrine = require('doctrine-temporary-fork'); -const parseMarkdown = require('./parse_markdown'); +const parseMarkdown = require('./remark-parse'); /** * Flatteners: these methods simplify the structure of JSDoc comments diff --git a/src/parse_markdown.js b/src/parse_markdown.js deleted file mode 100644 index 666661952..000000000 --- a/src/parse_markdown.js +++ /dev/null @@ -1,18 +0,0 @@ -const remark = require('remark'); -const inlineTokenizer = require('./inline_tokenizer'); - -/** - * Parse a string of Markdown into a Remark - * abstract syntax tree. - * - * @param {string} string markdown text - * @returns {Object} abstract syntax tree - * @private - */ -function parseMarkdown(string) { - return remark() - .use({ plugins: [inlineTokenizer], settings: { position: false } }) - .parse(string); -} - -module.exports = parseMarkdown; diff --git a/src/remark-jsDoc-link.js b/src/remark-jsDoc-link.js new file mode 100644 index 000000000..8bb5c0d8e --- /dev/null +++ b/src/remark-jsDoc-link.js @@ -0,0 +1,36 @@ +const findAndReplace = require('mdast-util-find-and-replace'); + +/** + * A remark plugin that installs + * for JSDoc inline `{@link}` and `{@tutorial}` tags. + * + * This does not handle the `[text]({@link url})` and `[text]({@tutorial url})` forms of these tags. + * That's a JSDoc misfeature; just use regular markdown syntax instead: `[text](url)`. + * + * @returns {Function} + */ +module.exports = function () { + function replace(type) { + return (match, matchUrl, matchValue) => { + return { + type, + url: matchUrl, + title: null, + jsdoc: true, + children: [ + { + type: 'text', + value: matchValue || matchUrl + } + ] + }; + }; + } + + return function transform(markdownAST) { + return findAndReplace(markdownAST, [ + [/\{@link\s+(.+?)(?:[\s|](.*?))?\}/g, replace('link')], + [/\{@tutorial\s+(.+?)(?:[\s|](.*?))?\}/g, replace('tutorial')] + ]); + }; +}; diff --git a/src/remark-parse.js b/src/remark-parse.js new file mode 100644 index 000000000..ba45b2616 --- /dev/null +++ b/src/remark-parse.js @@ -0,0 +1,18 @@ +const remark = require('remark'); +const removePosition = require('./remark-remove-position')(); +const jsDocLink = require('./remark-jsDoc-link')(); + +/** + * Parse a string of Markdown into a Remark + * abstract syntax tree. + * + * @param {string} string markdown text + * @returns {Object} abstract syntax tree + * @private + */ +module.exports = function (string) { + const treeAst = remark().parse(string); + removePosition(treeAst); + jsDocLink(treeAst); + return treeAst; +}; diff --git a/src/remark-remove-position.js b/src/remark-remove-position.js new file mode 100644 index 000000000..425e67a6a --- /dev/null +++ b/src/remark-remove-position.js @@ -0,0 +1,8 @@ +const visit = require('unist-util-visit'); + +module.exports = function () { + return function transform(markdownAST) { + visit(markdownAST, node => delete node.position); + return markdownAST; + }; +}; diff --git a/src/sort.js b/src/sort.js index 7f4de9c75..e016f8da4 100644 --- a/src/sort.js +++ b/src/sort.js @@ -1,4 +1,4 @@ -const parseMarkdown = require('./parse_markdown'); +const parseMarkdown = require('./remark-parse'); const chalk = require('chalk'); const path = require('path'); const fs = require('fs'); diff --git a/yarn.lock b/yarn.lock index 7f8b150be..7c1abccbd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2174,11 +2174,6 @@ code-point-at@^1.0.0: resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= -collapse-white-space@^1.0.2: - version "1.0.6" - resolved "https://registry.yarnpkg.com/collapse-white-space/-/collapse-white-space-1.0.6.tgz#e63629c0016665792060dbbeb79c42239d2c5287" - integrity sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ== - collect-v8-coverage@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" @@ -2678,6 +2673,13 @@ debug@^3.1.0: dependencies: ms "^2.1.1" +debug@^4.0.0: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + dependencies: + ms "2.1.2" + debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: version "4.2.0" resolved "https://registry.yarnpkg.com/debug/-/debug-4.2.0.tgz#7f150f93920e94c58f5574c2fd01a3110effe7f1" @@ -2925,6 +2927,11 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + escodegen@^1.14.1: version "1.14.3" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" @@ -3897,7 +3904,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.0, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -3944,11 +3951,6 @@ is-alphabetical@^1.0.0: resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-1.0.4.tgz#9e7d6b94916be22153745d184c298cbf986a686d" integrity sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg== -is-alphanumeric@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-alphanumeric/-/is-alphanumeric-1.0.0.tgz#4a9cef71daf4c001c1d81d63d140cf53fd6889f4" - integrity sha1-Spzvcdr0wAHB2B1j0UDPU/1oifQ= - is-alphanumerical@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz#7eb9a2431f855f6b1ef1a78e326df515696c4dbf" @@ -4239,21 +4241,11 @@ is-valid-glob@^1.0.0: resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-1.0.0.tgz#29bf3eff701be2d4d315dbacc39bc39fe8f601aa" integrity sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao= -is-whitespace-character@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz#0858edd94a95594c7c9dd0b5c174ec6e45ee4aa7" - integrity sha512-SDweEzfIZM0SJV0EUga669UTKlmL0Pq8Lno0QDQsPnvECB3IM2aP0gdx5TrU0A01MAPfViaZiI2V1QMZLaKK5w== - is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== -is-word-character@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-word-character/-/is-word-character-1.0.4.tgz#ce0e73216f98599060592f62ff31354ddbeb0230" - integrity sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA== - is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" @@ -5141,7 +5133,7 @@ log-update@^2.3.0: cli-cursor "^2.0.0" wrap-ansi "^3.0.1" -longest-streak@^2.0.1: +longest-streak@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-2.0.4.tgz#b8599957da5b5dab64dee3fe316fa774597d90e4" integrity sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg== @@ -5215,31 +5207,32 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" -markdown-escapes@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/markdown-escapes/-/markdown-escapes-1.0.4.tgz#c95415ef451499d7602b91095f3c8e8975f78535" - integrity sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg== - -markdown-table@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-2.0.0.tgz#194a90ced26d31fe753d8b9434430214c011865b" - integrity sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A== +mdast-util-definitions@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mdast-util-definitions/-/mdast-util-definitions-4.0.0.tgz#c5c1a84db799173b4dcf7643cda999e440c24db2" + integrity sha512-k8AJ6aNnUkB7IE+5azR9h81O5EQ/cTDXtWdMq9Kk5KcEW/8ritU5CeLg/9HhOC++nALHBlaogJ5jz0Ybk3kPMQ== dependencies: - repeat-string "^1.0.0" + unist-util-visit "^2.0.0" -mdast-util-compact@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/mdast-util-compact/-/mdast-util-compact-2.0.1.tgz#cabc69a2f43103628326f35b1acf735d55c99490" - integrity sha512-7GlnT24gEwDrdAwEHrU4Vv5lLWrEer4KOkAiKT9nYstsTad7Oc1TwqT2zIMKRdZF7cTuaf+GA1E4Kv7jJh8mPA== +mdast-util-find-and-replace@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/mdast-util-find-and-replace/-/mdast-util-find-and-replace-1.1.1.tgz#b7db1e873f96f66588c321f1363069abf607d1b5" + integrity sha512-9cKl33Y21lyckGzpSmEQnIDjEfeeWelN5s1kUW1LwdB0Fkuq2u+4GdqcGEygYxJE8GVqCl0741bYXHgamfWAZA== dependencies: - unist-util-visit "^2.0.0" + escape-string-regexp "^4.0.0" + unist-util-is "^4.0.0" + unist-util-visit-parents "^3.0.0" -mdast-util-definitions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/mdast-util-definitions/-/mdast-util-definitions-3.0.1.tgz#06af6c49865fc63d6d7d30125569e2f7ae3d0a86" - integrity sha512-BAv2iUm/e6IK/b2/t+Fx69EL/AGcq/IG2S+HxHjDJGfLJtd6i9SZUS76aC9cig+IEucsqxKTR0ot3m933R3iuA== +mdast-util-from-markdown@^0.8.0: + version "0.8.5" + resolved "https://registry.yarnpkg.com/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz#d1ef2ca42bc377ecb0463a987910dae89bd9a28c" + integrity sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ== dependencies: - unist-util-visit "^2.0.0" + "@types/mdast" "^3.0.0" + mdast-util-to-string "^2.0.0" + micromark "~2.11.0" + parse-entities "^2.0.0" + unist-util-stringify-position "^2.0.0" mdast-util-inject@^1.1.0: version "1.1.0" @@ -5248,20 +5241,32 @@ mdast-util-inject@^1.1.0: dependencies: mdast-util-to-string "^1.0.0" -mdast-util-to-hast@^9.0.0: - version "9.1.2" - resolved "https://registry.yarnpkg.com/mdast-util-to-hast/-/mdast-util-to-hast-9.1.2.tgz#10fa5ed9d45bf3755891e5801d0f32e2584a9423" - integrity sha512-OpkFLBC2VnNAb2FNKcKWu9FMbJhQKog+FCT8nuKmQNIKXyT1n3SIskE7uWDep6x+cA20QXlK5AETHQtYmQmxtQ== +mdast-util-to-hast@^10.0.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/mdast-util-to-hast/-/mdast-util-to-hast-10.2.0.tgz#61875526a017d8857b71abc9333942700b2d3604" + integrity sha512-JoPBfJ3gBnHZ18icCwHR50orC9kNH81tiR1gs01D8Q5YpV6adHNO9nKNuFBCJQ941/32PT1a63UF/DitmS3amQ== dependencies: "@types/mdast" "^3.0.0" "@types/unist" "^2.0.0" - mdast-util-definitions "^3.0.0" + mdast-util-definitions "^4.0.0" mdurl "^1.0.0" unist-builder "^2.0.0" unist-util-generated "^1.0.0" unist-util-position "^3.0.0" unist-util-visit "^2.0.0" +mdast-util-to-markdown@^0.6.0: + version "0.6.5" + resolved "https://registry.yarnpkg.com/mdast-util-to-markdown/-/mdast-util-to-markdown-0.6.5.tgz#b33f67ca820d69e6cc527a93d4039249b504bebe" + integrity sha512-XeV9sDE7ZlOQvs45C9UKMtfTcctcaj/pGwH8YLbMHoMOXNNCn2LsqVQOqrF1+/NU8lKDAqozme9SCXWyo9oAcQ== + dependencies: + "@types/unist" "^2.0.0" + longest-streak "^2.0.0" + mdast-util-to-string "^2.0.0" + parse-entities "^2.0.0" + repeat-string "^1.0.0" + zwitch "^1.0.0" + mdast-util-to-string@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz#27055500103f51637bd07d01da01eb1967a43527" @@ -5360,6 +5365,14 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== +micromark@~2.11.0: + version "2.11.4" + resolved "https://registry.yarnpkg.com/micromark/-/micromark-2.11.4.tgz#d13436138eea826383e822449c9a5c50ee44665a" + integrity sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA== + dependencies: + debug "^4.0.0" + parse-entities "^2.0.0" + micromatch@^3.1.4, micromatch@^3.1.5, micromatch@^3.1.8: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" @@ -6432,37 +6445,21 @@ regjsparser@^0.6.4: dependencies: jsesc "~0.5.0" -remark-html@^12.0.0: - version "12.0.0" - resolved "https://registry.yarnpkg.com/remark-html/-/remark-html-12.0.0.tgz#f39d2a5e173cce777981cb4171b4ea860313d72a" - integrity sha512-M104NMHs48+uswChJkCDXCdabzxAinpHikpt6kS3gmGMyIvPZ5kn53tB9shFsL2O4HUJ9DIEsah1SX1Ve5FXHA== +remark-html@^13.0.1: + version "13.0.1" + resolved "https://registry.yarnpkg.com/remark-html/-/remark-html-13.0.1.tgz#d5b2d8be01203e61fc37403167ca7584879ad675" + integrity sha512-K5KQCXWVz+harnyC+UVM/J9eJWCgjYRqFeZoZf2NgP0iFbuuw/RgMZv3MA34b/OEpGnstl3oiOUtZzD3tJ+CBw== dependencies: hast-util-sanitize "^3.0.0" hast-util-to-html "^7.0.0" - mdast-util-to-hast "^9.0.0" - xtend "^4.0.1" + mdast-util-to-hast "^10.0.0" -remark-parse@^8.0.0: - version "8.0.3" - resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-8.0.3.tgz#9c62aa3b35b79a486454c690472906075f40c7e1" - integrity sha512-E1K9+QLGgggHxCQtLt++uXltxEprmWzNfg+MxpfHsZlrddKzZ/hZyWHDbK3/Ap8HJQqYJRXP+jHczdL6q6i85Q== +remark-parse@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-9.0.0.tgz#4d20a299665880e4f4af5d90b7c7b8a935853640" + integrity sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw== dependencies: - ccount "^1.0.0" - collapse-white-space "^1.0.2" - is-alphabetical "^1.0.0" - is-decimal "^1.0.0" - is-whitespace-character "^1.0.0" - is-word-character "^1.0.0" - markdown-escapes "^1.0.0" - parse-entities "^2.0.0" - repeat-string "^1.5.4" - state-toggle "^1.0.0" - trim "0.0.1" - trim-trailing-lines "^1.0.0" - unherit "^1.0.4" - unist-util-remove-position "^2.0.0" - vfile-location "^3.0.0" - xtend "^4.0.1" + mdast-util-from-markdown "^0.8.0" remark-reference-links@^5.0.0: version "5.0.0" @@ -6471,25 +6468,12 @@ remark-reference-links@^5.0.0: dependencies: unist-util-visit "^2.0.0" -remark-stringify@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/remark-stringify/-/remark-stringify-8.1.1.tgz#e2a9dc7a7bf44e46a155ec78996db896780d8ce5" - integrity sha512-q4EyPZT3PcA3Eq7vPpT6bIdokXzFGp9i85igjmhRyXWmPs0Y6/d2FYwUNotKAWyLch7g0ASZJn/KHHcHZQ163A== +remark-stringify@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/remark-stringify/-/remark-stringify-9.0.1.tgz#576d06e910548b0a7191a71f27b33f1218862894" + integrity sha512-mWmNg3ZtESvZS8fv5PTvaPckdL4iNlCHTt8/e/8oN08nArHRHjNZMKzA/YW3+p7/lYqIw4nx1XsjCBo/AxNChg== dependencies: - ccount "^1.0.0" - is-alphanumeric "^1.0.0" - is-decimal "^1.0.0" - is-whitespace-character "^1.0.0" - longest-streak "^2.0.1" - markdown-escapes "^1.0.0" - markdown-table "^2.0.0" - mdast-util-compact "^2.0.0" - parse-entities "^2.0.0" - repeat-string "^1.5.4" - state-toggle "^1.0.0" - stringify-entities "^3.0.0" - unherit "^1.0.4" - xtend "^4.0.1" + mdast-util-to-markdown "^0.6.0" remark-toc@^7.2.0: version "7.2.0" @@ -6499,14 +6483,14 @@ remark-toc@^7.2.0: "@types/unist" "^2.0.3" mdast-util-toc "^5.0.0" -remark@^12.0.0: - version "12.0.1" - resolved "https://registry.yarnpkg.com/remark/-/remark-12.0.1.tgz#f1ddf68db7be71ca2bad0a33cd3678b86b9c709f" - integrity sha512-gS7HDonkdIaHmmP/+shCPejCEEW+liMp/t/QwmF0Xt47Rpuhl32lLtDV1uKWvGoq+kxr5jSgg5oAIpGuyULjUw== +remark@^13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/remark/-/remark-13.0.0.tgz#d15d9bf71a402f40287ebe36067b66d54868e425" + integrity sha512-HDz1+IKGtOyWN+QgBiAT0kn+2s6ovOxHyPAFGKVE81VSzJ+mq7RwHFledEvB5F1p4iJvOah/LOKdFuzvRnNLCA== dependencies: - remark-parse "^8.0.0" - remark-stringify "^8.0.0" - unified "^9.0.0" + remark-parse "^9.0.0" + remark-stringify "^9.0.0" + unified "^9.1.0" remove-bom-buffer@^3.0.0: version "3.0.0" @@ -6535,7 +6519,7 @@ repeat-element@^1.1.2: resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== -repeat-string@^1.0.0, repeat-string@^1.5.0, repeat-string@^1.5.4, repeat-string@^1.6.1: +repeat-string@^1.0.0, repeat-string@^1.5.0, repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= @@ -7066,11 +7050,6 @@ standard-version@^9.2.0: stringify-package "^1.0.1" yargs "^16.0.0" -state-toggle@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/state-toggle/-/state-toggle-1.0.3.tgz#e123b16a88e143139b09c6852221bc9815917dfe" - integrity sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ== - static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" @@ -7167,7 +7146,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -stringify-entities@^3.0.0, stringify-entities@^3.0.1: +stringify-entities@^3.0.1: version "3.1.0" resolved "https://registry.yarnpkg.com/stringify-entities/-/stringify-entities-3.1.0.tgz#b8d3feac256d9ffcc9fa1fefdcf3ca70576ee903" integrity sha512-3FP+jGMmMV/ffZs86MoghGqAoqXAdxLrJP4GUdrDN1aIScYih5tuIO3eF4To5AJZ79KDZ8Fpdy7QJnK8SsL1Vg== @@ -7513,16 +7492,6 @@ trim-off-newlines@^1.0.0: resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= -trim-trailing-lines@^1.0.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz#bd4abbec7cc880462f10b2c8b5ce1d8d1ec7c2c0" - integrity sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ== - -trim@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz#5858547f6b290757ee95cccc666fb50084c460dd" - integrity sha1-WFhUf2spB1fulczMZm+1AITEYN0= - trough@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.5.tgz#b8b639cefad7d0bb2abd37d433ff8293efa5f406" @@ -7616,14 +7585,6 @@ unc-path-regex@^0.1.2: resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" integrity sha1-5z3T17DXxe2G+6xrCufYxqadUPo= -unherit@^1.0.4: - version "1.1.3" - resolved "https://registry.yarnpkg.com/unherit/-/unherit-1.1.3.tgz#6c9b503f2b41b262330c80e91c8614abdaa69c22" - integrity sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ== - dependencies: - inherits "^2.0.0" - xtend "^4.0.0" - unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" @@ -7647,7 +7608,7 @@ unicode-property-aliases-ecmascript@^1.0.4: resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz#dd57a99f6207bedff4628abefb94c50db941c8f4" integrity sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg== -unified@^9.0.0: +unified@^9.1.0: version "9.2.1" resolved "https://registry.yarnpkg.com/unified/-/unified-9.2.1.tgz#ae18d5674c114021bfdbdf73865ca60f410215a3" integrity sha512-juWjuI8Z4xFg8pJbnEZ41b5xjGUWGHqXALmBZ3FC3WX0PIx1CZBIIJ6mXbYMcf6Yw4Fi0rFUTA1cdz/BglbOhA== @@ -7697,13 +7658,6 @@ unist-util-position@^3.0.0: resolved "https://registry.yarnpkg.com/unist-util-position/-/unist-util-position-3.1.0.tgz#1c42ee6301f8d52f47d14f62bbdb796571fa2d47" integrity sha512-w+PkwCbYSFw8vpgWD0v7zRCl1FpY3fjDSQ3/N/wNd9Ffa4gPi8+4keqt99N3XW6F99t/mUzp2xAhNmfKWp95QA== -unist-util-remove-position@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/unist-util-remove-position/-/unist-util-remove-position-2.0.1.tgz#5d19ca79fdba712301999b2b73553ca8f3b352cc" - integrity sha512-fDZsLYIe2uT+oGFnuZmy73K6ZxOPG/Qcm+w7jbEjaFcJgbQ6cqjs/eSPzXhsmGpAsWPkqZM9pYjww5QTn3LHMA== - dependencies: - unist-util-visit "^2.0.0" - unist-util-stringify-position@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz#cce3bfa1cdf85ba7375d1d5b17bdc4cada9bd9da" @@ -7814,11 +7768,6 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -vfile-location@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/vfile-location/-/vfile-location-3.2.0.tgz#d8e41fbcbd406063669ebf6c33d56ae8721d0f3c" - integrity sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA== - vfile-message@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/vfile-message/-/vfile-message-2.0.4.tgz#5b43b88171d409eae58477d13f23dd41d52c371a" @@ -8067,7 +8016,7 @@ xmlchars@^2.2.0: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== -xtend@^4.0.0, xtend@^4.0.1, xtend@^4.0.2, xtend@~4.0.0, xtend@~4.0.1: +xtend@^4.0.0, xtend@^4.0.2, xtend@~4.0.0, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== @@ -8144,3 +8093,8 @@ yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + +zwitch@^1.0.0: + version "1.0.5" + resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-1.0.5.tgz#d11d7381ffed16b742f6af7b3f223d5cd9fe9920" + integrity sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==