├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── index.js ├── package-lock.json ├── package.json └── test ├── fixtures ├── anchors-special-chars.html ├── anchors-special-chars.md ├── basic.html ├── basic.md ├── custom-attrs-with-anchors.html ├── custom-attrs.html ├── custom-attrs.md ├── empty.html ├── full-example-custom-container.html ├── full-example-list-attrs.html ├── full-example.html ├── full-example.md ├── multi-level-1234.html ├── multi-level-23.html ├── multi-level.md ├── omit.html ├── omit.md ├── simple-1-level.html ├── simple-default.html ├── simple-with-anchors.html ├── simple-with-duplicate-headings.html ├── simple-with-duplicate-headings.md ├── simple-with-header-footer.html ├── simple-with-heading-links.html ├── simple-with-heading-links.md ├── simple-with-markdown-formatting.html ├── simple-with-markdown-formatting.md ├── simple-with-transform-link.html ├── simple.md ├── strange-order.html └── strange-order.md └── modules └── test.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage 15 | 16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 17 | .grunt 18 | 19 | # node-waf configuration 20 | .lock-wscript 21 | 22 | # Compiled binary addons (http://nodejs.org/api/addons.html) 23 | build/Release 24 | 25 | # Dependency directory 26 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 27 | node_modules 28 | .DS_Store 29 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to this project will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 5 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 | 7 | ## [Unreleased] 8 | 9 | ## [0.9.0] - 2025-01-21 10 | 11 | * **Added:** Headlines can now be omitted from the table of contents by placing a special HTML comment tag before the headline (fixes #65). 12 | * **Added:** Option `omitTag` can override the default tag `` 13 | 14 | *** 15 | 16 | ## [0.8.0] - 2024-09-10 17 | 18 | * **Added:** Option `getTokensText` to override how text is extracted from tokens to build headlines and slugs (fixes #61), similar to the function in [markdown-it-anchor](https://www.npmjs.com/package/markdown-it-anchor). 19 | 20 | *** 21 | 22 | ## [0.7.0] - 2024-09-09 23 | 24 | * **Added:** Override the container element 25 | * ⚠️ **BREAKING CHANGE:** The plugin moved from *inline mode* to *block mode* (fixes #62) 26 | * **Changed:** Updated tests, readme etc. 27 | * **Removed:** Old forceFullToc attribute 28 | 29 | *** 30 | 31 | ## Override the container element 32 | 33 | Two new options that accept functions that return HTML to render custom containers (and more elements if necessary): 34 | 35 | ```js 36 | md.use(markdownItTOC, { 37 | transformContainerOpen: () => { 38 | return ''; 42 | } 43 | }); 44 | ``` 45 | 46 | ## Inline mode is now block mode 47 | 48 | Input: 49 | 50 | ```md 51 | [[toc]] 52 | ``` 53 | 54 | **Output before:** 55 | 56 | ```html 57 |

58 | ``` 59 | 60 | **Output now:** 61 | 62 | ```html 63 |
64 | ``` 65 | 66 | The TOC now is generated in block mode, which removes the wrapping `p` tag. Wrapping a `div` in a `p` is considered invalid HTML. 67 | 68 | If you really need a wrapping p-element, you can emulate the old behavior with the new container override functions: 69 | 70 | ```js 71 | const md = new MarkdownIt(); 72 | md.use(markdownItTOC, { 73 | transformContainerOpen: () => { 74 | return '

'; 75 | }, 76 | transformContainerClose: () => { 77 | return '

'; 78 | } 79 | }); 80 | ``` 81 | 82 | Be aware that the old tests/examples now behave differently when using soft breaks before the [[toc]] markup: 83 | 84 | Input: 85 | 86 | ```md 87 | # Article 88 | Text with soft line break (two spaces) 89 | [[toc]] 90 | 91 | ## Headline 92 | ``` 93 | 94 | **Output before:** 95 | 96 | ```md 97 |

Article

98 |

Text with soft line break (two spaces)
99 |

...

100 | ``` 101 | 102 | **Output now:** 103 | 104 | ```md 105 |

Article

106 |

Text with soft line break (two spaces)

107 |
...
108 | ``` 109 | 110 | *** 111 | 112 | ## [0.6.0] - 2021-11-12 113 | 114 | The TOC generator was rewritten, because the old *on-the-fly* generator couldn't deal with unexpected order of headings and double-indentations. It is now a three-step process: 115 | 116 | 1. Gather all headings in a list. 117 | 2. Turn that list into a nested tree. 118 | 3. Generate HTML code based on the nested tree. 119 | 120 | Although all tests pass, this release could introduce some **breaking changes** for you, if you relied on the old way of doing things. Check the test cases to get a better understanding how this plugin handles various cases. 121 | 122 | * **Added**: Support for `markdown-it-attrs` (fixes #54) 123 | * **Changed**: Respects unexpected nesting order (fixes #55) 124 | * **Changed**: Uses anchor targets from existing id attributes (for example, set by `markdown-it-attrs` or `markdown-it-anchor`) 125 | * **Changed**: Now nests list correctly if there is a jump (for example: h2, h2, h4 -> h4 is now double-indented) 126 | * **Removed**: unused tests -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-2020 Oktavilla, 2021+ Chris Maas 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # markdown-it-table-of-contents 2 | A table of contents plugin for Markdown-it. Simple, customizable and with a default slugifier that matches that of [markdown-it-anchor](https://www.npmjs.com/package/markdown-it-anchor) (>5.0.0). 3 | 4 | ## Usage 5 | 6 | ``` javascript 7 | var MarkdownIt = require("markdown-it"); 8 | var md = new MarkdownIt(); 9 | 10 | md.use(require("markdown-it-anchor").default); // Optional, but makes sense as you really want to link to something, see info about recommended plugins below 11 | md.use(require("markdown-it-table-of-contents")); 12 | ``` 13 | 14 | Then add `[[toc]]` where you want the table of contents to be added in your document. 15 | 16 | *Want to use a table of contents generator client-side in the browser? Try my `` webcomponent: [table-of-contents-element on GitHub](https://github.com/cmaas/table-of-contents-element). Advantage: can use more sophisticated query selector and better support for HTML customization.* 17 | 18 | ## Example markdown 19 | 20 | This markdown: 21 | 22 | ``` markdown 23 | # Heading 24 | 25 | [[toc]] 26 | 27 | ## Sub heading 1 28 | Some nice text 29 | 30 | ## Sub heading 2 31 | Some even nicer text 32 | ``` 33 | 34 | ... would render this HTML using the default options specified in "usage" above: 35 | 36 | ``` html 37 |

Heading

38 | 39 |
40 | 48 |
49 | 50 |

Sub heading 1

51 |

Some nice text

52 | 53 |

Sub heading 2

54 |

Some even nicer text

55 | ``` 56 | 57 | ## Options 58 | 59 | You may specify options when `use`ing the plugin. like so: 60 | 61 | ```js 62 | md.use(require("markdown-it-table-of-contents"), options); 63 | ``` 64 | 65 | These options are available: 66 | 67 | Name | Description | Default 68 | -----------------------|-------------------------------------------------------------------------------------|------------------------------------ 69 | `includeLevel` | Headings levels to use (2 for h2:s etc) | [1, 2] 70 | `containerClass` | The class for the container DIV | "table-of-contents" 71 | `slugify` | A custom slugification function | `encodeURIComponent(String(s).trim().toLowerCase().replace(/\s+/g, '-'))` 72 | `markerPattern` | Regex pattern of the marker to be replaced with TOC | `/^\[\[toc\]\]/im` 73 | `omitTag` | HTML comment tag to exclude next headline from TOC | `` 74 | `listType` | Type of list (`ul` for unordered, `ol` for ordered) | `ul` 75 | `format` | A function for formatting headings (see below) | `md.renderInline(content)` 76 | `containerHeaderHtml` | Optional HTML string for container header | `undefined` 77 | `containerFooterHtml` | Optional HTML string for container footer | `undefined` 78 | `transformLink` | A function for transforming the TOC links | `undefined` 79 | `transformContainerOpen`| A function for transforming the container opening tag | (see source code) 80 | `transformContainerClose`| A function for transforming the container closing tag | (see source code) 81 | `getTokensText` | A function for extracting text from tokens for titles | (see source code) 82 | 83 | `format` is an optional function for changing how the headings are displayed in the TOC. 84 | 85 | By default, TOC headings will be formatted using markdown-it's internal MD formatting rules (i.e. it will be formatted using the same rules / extensions as other markdown in your document). You can override this behavior by specifying a custom `format` function. The function should accept two arguments: 86 | 87 | 1. `content` - The heading test, as a markdown string. 88 | 2. `md` – markdown-it's internal markdown parser object. This should only be need for advanced use cases. 89 | 90 | ```js 91 | function format(content, md) { 92 | // manipulate the headings as you like here. 93 | return manipulatedHeadingString; 94 | } 95 | ``` 96 | 97 | `transformLink` is an optional function for transform the link as you like. 98 | 99 | ```js 100 | function transformLink(link) { 101 | // transform the link as you like here. 102 | return transformedLink; 103 | } 104 | ``` 105 | 106 | `transformContainerOpen` and `transformContainerClose` can be used to replace the container element with one or several more like so: 107 | 108 | ```js 109 | md.use(markdownItTOC, { 110 | transformContainerOpen: () => { 111 | return ''; 115 | } 116 | }); 117 | ``` 118 | 119 | `getTokensText` is a function that can be used to change how text is extracted from tokens to support more ways how headlines are build. See source code for more information or the equivalent function in [markdown-it-anchor](https://www.npmjs.com/package/markdown-it-anchor). 120 | 121 | ## Recommended plugins 122 | 123 | By default, markdown-it-table-of-contents collects all headings and renders a nested list. It uses the `slugify()` function to create anchor targets for the links in the list. However, the headlines in your markdown document are not touched by markdown-it-table-of-contents. You'd have a nice table of contents, but the links don't link to anything. That's why you need another plugin to generate ids (anchor link targets) for all of your headlines. There are two recommended plugins to achieve this: 124 | 125 | ### [markdown-it-anchor](https://www.npmjs.com/package/markdown-it-anchor) 126 | 127 | This plugin transforms all headlines in a markdown document so that the HTML code includes an id. It *slugifies* the headline: 128 | 129 | ```markdown 130 | ## Hello world, I think you should read this article 131 | ``` 132 | 133 | Becomes 134 | 135 | ```html 136 |

Hello world, I think you should read this article

137 | ``` 138 | 139 | ### [markdown-it-attrs](https://www.npmjs.com/package/markdown-it-attrs) 140 | 141 | This plugin lets you attach custom attributes to your headlines. This is especially useful, if you have long headlines but want short anchors: 142 | 143 | ```markdown 144 | ## Hello world, I think you should read this article {#hello} 145 | ``` 146 | 147 | Becomes 148 | 149 | ```html 150 |

Hello world, I think you should read this article

151 | ``` 152 | 153 | ## Full example with unusual headline order 154 | 155 | Of course, both plugins can be combined. markdown-it-anchor ignores headlines that already have an id attribute. 156 | 157 | Furthermore, markdown-it-table-of-contents can handle unusual heading orders. Consider the full example below: 158 | 159 | ```js 160 | var md = new MarkdownIt(); 161 | md.use(markdownItTOC, { 162 | "includeLevel": [2,3,4] 163 | }); 164 | md.use(require("markdown-it-attrs")); 165 | md.use(require("markdown-it-anchor")); 166 | ``` 167 | 168 | 169 | ```markdown 170 | # Article 171 | 172 | [[toc]] 173 | 174 | ### A message from our sponsors 175 | 176 | Ad 177 | 178 | ## Hello world, I think you should read this article {#hello} 179 | 180 | Lorem ipsum 181 | 182 | ## What's next? 183 | 184 | Read this next... 185 | 186 | #### See related articles {#related} 187 | ``` 188 | 189 | HTML output: 190 | 191 | ```html 192 |

Article

193 |

194 |

195 | 212 |
213 |

214 |

A message from our sponsors

215 |

Ad

216 |

Hello world, I think you should read this article

217 |

Lorem ipsum

218 |

What's next?

219 |

Read this next...

220 | 221 | ``` 222 | 223 | ## Example for omitting headlines from the TOC 224 | 225 | If you want to exclude single headlines, you can use a special HTML comment to omit the next headline from the TOC: 226 | 227 | ```markdown 228 | 229 | # Title 230 | ``` 231 | 232 | For this to work, the HTML comment must come right in the line before the headline you want to exclude. Furthermore, you need to allow HTML in MarkdownIT: 233 | 234 | ```js 235 | const md = new MarkdownIt({ html: true }); 236 | ``` 237 | 238 | You can override the HTML comment by using the option `omitTag` as explained above. Both, the tag and the actual comment in the Markdown file are case-insensitive. 239 | 240 | ## Additional infos 241 | 242 | * This plugin outputs a semantically correct table of contents. Sub-lists are rendered within the parent `
  • ` tag and not as a separate (empty) `
  • `. 243 | * Headlines can be in an arbitrary order. For example, h3, h2, h4. Please note that the jump from h2 to h4 causes a doube-indentation, which is correct. -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | //@ts-check 2 | 'use strict'; 3 | 4 | /* 5 | * markdown-it-table-of-contents 6 | * 7 | * The algorithm works as follows: 8 | * Step 1: Gather all headline tokens from a Markdown document and put them in an array. 9 | * Step 2: Turn the flat array into a nested tree, respecting the correct headline level. 10 | * Step 3: Turn the nested tree into HTML code. 11 | */ 12 | 13 | const slugify = function (s) { 14 | return encodeURIComponent(String(s).trim().toLowerCase().replace(/\s+/g, '-')); 15 | }; 16 | 17 | const transformContainerOpen = function (containerClass, containerHeaderHtml) { 18 | let tocOpenHtml = '
    '; 19 | if (containerHeaderHtml) { 20 | tocOpenHtml += containerHeaderHtml; 21 | } 22 | return tocOpenHtml; 23 | }; 24 | 25 | const transformContainerClose = function (containerFooterHtml) { 26 | let tocFooterHtml = ''; 27 | if (containerFooterHtml) { 28 | tocFooterHtml = containerFooterHtml; 29 | } 30 | return tocFooterHtml + '
    '; 31 | }; 32 | 33 | const defaultOptions = { 34 | includeLevel: [1, 2], 35 | containerClass: 'table-of-contents', 36 | slugify: slugify, 37 | markerPattern: /^\[\[toc\]\]/im, 38 | omitTag: '', 39 | listType: 'ul', 40 | format: function (content, md) { 41 | return md.renderInline(content); 42 | }, 43 | containerHeaderHtml: undefined, 44 | containerFooterHtml: undefined, 45 | transformLink: undefined, 46 | transformContainerOpen: transformContainerOpen, 47 | transformContainerClose: transformContainerClose, 48 | getTokensText: getTokensText 49 | }; 50 | 51 | /** 52 | * @typedef {Object} HeadlineItem 53 | * @property {number} level Headline level 54 | * @property {string} anchor Anchor target 55 | * @property {string} text Text of headline 56 | */ 57 | 58 | /** 59 | * @typedef {Object} TocItem 60 | * @property {number} level Item level 61 | * @property {string} text Text of link 62 | * @property {string} anchor Target of link 63 | * @property {Array} children Sub-items for this list item 64 | * @property {TocItem} parent Parent this item belongs to 65 | */ 66 | 67 | /** 68 | * Helper to extract text from tokens, same function as in markdown-it-anchor 69 | * @returns {string} 70 | */ 71 | function getTokensText(tokens) { 72 | return tokens 73 | .filter(t => ['text', 'code_inline'].includes(t.type)) 74 | .map(t => t.content) 75 | .join(''); 76 | } 77 | 78 | /** 79 | * Finds all headline items for the defined levels in a Markdown document. 80 | * @param {Array} levels includeLevels like `[1, 2, 3]` 81 | * @param {*} tokens Tokens gathered by the plugin 82 | * @param {*} options Plugin options 83 | * @returns {Array} 84 | */ 85 | function findHeadlineElements(levels, tokens, options) { 86 | const headings = []; 87 | let currentHeading = null; 88 | 89 | tokens.forEach((token, index) => { 90 | if (token.type === 'heading_open') { 91 | const prev = index > 0 ? tokens[index-1] : null; 92 | if (prev && prev.type === 'html_block' && prev.content.trim().toLowerCase().replace('\n', '') === options.omitTag) { 93 | return; 94 | } 95 | const id = findExistingIdAttr(token); 96 | const level = parseInt(token.tag.toLowerCase().replace('h', ''), 10); 97 | if (levels.indexOf(level) >= 0) { 98 | currentHeading = { 99 | level: level, 100 | text: null, 101 | anchor: id || null 102 | }; 103 | } 104 | } 105 | else if (currentHeading && token.type === 'inline') { 106 | const textContent = options.getTokensText(token.children); 107 | currentHeading.text = textContent; 108 | if (!currentHeading.anchor) { 109 | currentHeading.anchor = options.slugify(textContent, token.content); 110 | } 111 | } 112 | else if (token.type === 'heading_close') { 113 | if (currentHeading) { 114 | headings.push(currentHeading); 115 | } 116 | currentHeading = null; 117 | } 118 | }); 119 | 120 | return headings; 121 | } 122 | 123 | /** 124 | * Helper to find an existing id attr on a token. Should be a heading_open token, but could be anything really 125 | * Provided by markdown-it-anchor or markdown-it-attrs 126 | * @param {any} token Token 127 | * @returns {string | null} Id attribute to use as anchor 128 | */ 129 | function findExistingIdAttr(token) { 130 | if (token && token.attrs && token.attrs.length > 0) { 131 | const idAttr = token.attrs.find((attr) => { 132 | if (Array.isArray(attr) && attr.length >= 2) { 133 | return attr[0] === 'id'; 134 | } 135 | return false; 136 | }); 137 | if (idAttr && Array.isArray(idAttr) && idAttr.length >= 2) { 138 | const [key, val] = idAttr; 139 | return val; 140 | } 141 | } 142 | return null; 143 | } 144 | 145 | /** 146 | * Helper to get minimum headline level so that the TOC is nested correctly 147 | * @param {Array} headlineItems Search these 148 | * @returns {number} Minimum level 149 | */ 150 | function getMinLevel(headlineItems) { 151 | return Math.min(...headlineItems.map(item => item.level)); 152 | } 153 | 154 | /** 155 | * Helper that creates a TOCItem 156 | * @param {number} level 157 | * @param {string} text 158 | * @param {string} anchor 159 | * @param {TocItem} rootNode 160 | * @returns {TocItem} 161 | */ 162 | function addListItem(level, text, anchor, rootNode) { 163 | const listItem = { level, text, anchor, children: [], parent: rootNode }; 164 | rootNode.children.push(listItem); 165 | return listItem; 166 | } 167 | 168 | /** 169 | * Turns a list of flat headline items into a nested tree object representing the TOC 170 | * @param {Array} headlineItems 171 | * @returns {TocItem} Tree of TOC items 172 | */ 173 | function flatHeadlineItemsToNestedTree(headlineItems) { 174 | // create a root node with no text that holds the entire TOC. this won't be rendered, but only its children 175 | const toc = { level: getMinLevel(headlineItems) - 1, anchor: null, text: null, children: [], parent: null }; 176 | // pointer that tracks the last root item of the current list 177 | let currentRootNode = toc; 178 | // pointer that tracks the last item (to turn it into a new root node if necessary) 179 | let prevListItem = currentRootNode; 180 | 181 | headlineItems.forEach(headlineItem => { 182 | // if level is bigger, take the previous node, add a child list, set current list to this new child list 183 | if (headlineItem.level > prevListItem.level) { 184 | // eslint-disable-next-line no-unused-vars 185 | Array.from({ length: headlineItem.level - prevListItem.level }).forEach(_ => { 186 | currentRootNode = prevListItem; 187 | prevListItem = addListItem(headlineItem.level, null, null, currentRootNode); 188 | }); 189 | prevListItem.text = headlineItem.text; 190 | prevListItem.anchor = headlineItem.anchor; 191 | } 192 | // if level is same, add to the current list 193 | else if (headlineItem.level === prevListItem.level) { 194 | prevListItem = addListItem(headlineItem.level, headlineItem.text, headlineItem.anchor, currentRootNode); 195 | } 196 | // if level is smaller, set current list to currentlist.parent 197 | else if (headlineItem.level < prevListItem.level) { 198 | for (let i = 0; i < prevListItem.level - headlineItem.level; i++) { 199 | currentRootNode = currentRootNode.parent; 200 | } 201 | prevListItem = addListItem(headlineItem.level, headlineItem.text, headlineItem.anchor, currentRootNode); 202 | } 203 | }); 204 | 205 | return toc; 206 | } 207 | 208 | /** 209 | * Recursively turns a nested tree of tocItems to HTML. 210 | * @param {TocItem} tocItem 211 | * @returns {string} 212 | */ 213 | function tocItemToHtml(tocItem, options, md) { 214 | return '<' + options.listType + '>' + tocItem.children.map(childItem => { 215 | let li = '
  • '; 216 | let anchor = childItem.anchor; 217 | if (options && options.transformLink) { 218 | anchor = options.transformLink(anchor); 219 | } 220 | 221 | let text = childItem.text ? options.format(childItem.text, md, anchor) : null; 222 | 223 | li += anchor ? `${text}` : (text || ''); 224 | 225 | return li + (childItem.children.length > 0 ? tocItemToHtml(childItem, options, md) : '') + '
  • '; 226 | }).join('') + ''; 227 | } 228 | 229 | module.exports = function (md, opts) { 230 | const options = Object.assign({}, defaultOptions, opts); 231 | const tocRegexp = options.markerPattern; 232 | 233 | function toc(state, startLine, endLine, silent) { 234 | let token; 235 | let match; 236 | const start = state.bMarks[startLine] + state.tShift[startLine]; 237 | const max = state.eMarks[startLine]; 238 | 239 | // Reject if the token does not start with [ 240 | if (state.src.charCodeAt(start) !== 0x5B /* [ */) { 241 | return false; 242 | } 243 | 244 | // Detect [[toc]] markup 245 | match = tocRegexp.exec(state.src.substring(start, max)); 246 | match = !match ? [] : match.filter(function (m) { return m; }); 247 | if (match.length < 1) { 248 | return false; 249 | } 250 | 251 | if (silent) { 252 | return true; 253 | } 254 | 255 | state.line = startLine + 1 256 | 257 | // Build content 258 | token = state.push('toc_open', 'toc', 1); 259 | token.markup = '[[toc]]'; 260 | token.map = [startLine, state.line]; 261 | 262 | token = state.push('toc_body', '', 0); 263 | token.markup = '' 264 | token.map = [startLine, state.line]; 265 | token.children = []; 266 | 267 | token = state.push('toc_close', 'toc', -1); 268 | token.markup = ''; 269 | 270 | return true; 271 | } 272 | 273 | md.renderer.rules.toc_open = function (tokens, index) { 274 | return options.transformContainerOpen(options.containerClass, options.containerHeaderHtml); 275 | }; 276 | 277 | md.renderer.rules.toc_close = function (tokens, index) { 278 | return options.transformContainerClose(options.containerFooterHtml) + '\n'; 279 | }; 280 | 281 | md.renderer.rules.toc_body = function (tokens, index) { 282 | const headlineItems = findHeadlineElements(options.includeLevel, tokens, options); 283 | const tocTree = flatHeadlineItemsToNestedTree(headlineItems); 284 | const html = tocItemToHtml(tocTree, options, md); 285 | return html; 286 | }; 287 | 288 | md.block.ruler.before('heading', 'toc', toc, { 289 | alt: ['paragraph', 'reference', 'blockquote'] 290 | }); 291 | }; 292 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "markdown-it-table-of-contents", 3 | "version": "0.9.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "markdown-it-table-of-contents", 9 | "version": "0.9.0", 10 | "license": "MIT", 11 | "devDependencies": { 12 | "markdown-it": "~14.1.0", 13 | "markdown-it-anchor": "~9.2.0", 14 | "markdown-it-attrs": "^4.3.1", 15 | "mocha": "~11.0.1" 16 | }, 17 | "engines": { 18 | "node": ">6.4.0" 19 | } 20 | }, 21 | "node_modules/@isaacs/cliui": { 22 | "version": "8.0.2", 23 | "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", 24 | "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", 25 | "dev": true, 26 | "license": "ISC", 27 | "dependencies": { 28 | "string-width": "^5.1.2", 29 | "string-width-cjs": "npm:string-width@^4.2.0", 30 | "strip-ansi": "^7.0.1", 31 | "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", 32 | "wrap-ansi": "^8.1.0", 33 | "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" 34 | }, 35 | "engines": { 36 | "node": ">=12" 37 | } 38 | }, 39 | "node_modules/@isaacs/cliui/node_modules/ansi-regex": { 40 | "version": "6.1.0", 41 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", 42 | "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", 43 | "dev": true, 44 | "license": "MIT", 45 | "engines": { 46 | "node": ">=12" 47 | }, 48 | "funding": { 49 | "url": "https://github.com/chalk/ansi-regex?sponsor=1" 50 | } 51 | }, 52 | "node_modules/@isaacs/cliui/node_modules/ansi-styles": { 53 | "version": "6.2.1", 54 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", 55 | "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", 56 | "dev": true, 57 | "license": "MIT", 58 | "engines": { 59 | "node": ">=12" 60 | }, 61 | "funding": { 62 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 63 | } 64 | }, 65 | "node_modules/@isaacs/cliui/node_modules/emoji-regex": { 66 | "version": "9.2.2", 67 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", 68 | "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", 69 | "dev": true, 70 | "license": "MIT" 71 | }, 72 | "node_modules/@isaacs/cliui/node_modules/string-width": { 73 | "version": "5.1.2", 74 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", 75 | "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", 76 | "dev": true, 77 | "license": "MIT", 78 | "dependencies": { 79 | "eastasianwidth": "^0.2.0", 80 | "emoji-regex": "^9.2.2", 81 | "strip-ansi": "^7.0.1" 82 | }, 83 | "engines": { 84 | "node": ">=12" 85 | }, 86 | "funding": { 87 | "url": "https://github.com/sponsors/sindresorhus" 88 | } 89 | }, 90 | "node_modules/@isaacs/cliui/node_modules/strip-ansi": { 91 | "version": "7.1.0", 92 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", 93 | "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", 94 | "dev": true, 95 | "license": "MIT", 96 | "dependencies": { 97 | "ansi-regex": "^6.0.1" 98 | }, 99 | "engines": { 100 | "node": ">=12" 101 | }, 102 | "funding": { 103 | "url": "https://github.com/chalk/strip-ansi?sponsor=1" 104 | } 105 | }, 106 | "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { 107 | "version": "8.1.0", 108 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", 109 | "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", 110 | "dev": true, 111 | "license": "MIT", 112 | "dependencies": { 113 | "ansi-styles": "^6.1.0", 114 | "string-width": "^5.0.1", 115 | "strip-ansi": "^7.0.1" 116 | }, 117 | "engines": { 118 | "node": ">=12" 119 | }, 120 | "funding": { 121 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 122 | } 123 | }, 124 | "node_modules/@pkgjs/parseargs": { 125 | "version": "0.11.0", 126 | "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", 127 | "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", 128 | "dev": true, 129 | "license": "MIT", 130 | "optional": true, 131 | "engines": { 132 | "node": ">=14" 133 | } 134 | }, 135 | "node_modules/@types/linkify-it": { 136 | "version": "5.0.0", 137 | "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", 138 | "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", 139 | "dev": true, 140 | "license": "MIT", 141 | "peer": true 142 | }, 143 | "node_modules/@types/markdown-it": { 144 | "version": "14.1.2", 145 | "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.2.tgz", 146 | "integrity": "sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==", 147 | "dev": true, 148 | "license": "MIT", 149 | "peer": true, 150 | "dependencies": { 151 | "@types/linkify-it": "^5", 152 | "@types/mdurl": "^2" 153 | } 154 | }, 155 | "node_modules/@types/mdurl": { 156 | "version": "2.0.0", 157 | "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", 158 | "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", 159 | "dev": true, 160 | "license": "MIT", 161 | "peer": true 162 | }, 163 | "node_modules/ansi-colors": { 164 | "version": "4.1.3", 165 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", 166 | "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", 167 | "dev": true, 168 | "license": "MIT", 169 | "engines": { 170 | "node": ">=6" 171 | } 172 | }, 173 | "node_modules/ansi-regex": { 174 | "version": "5.0.1", 175 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 176 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 177 | "dev": true, 178 | "license": "MIT", 179 | "engines": { 180 | "node": ">=8" 181 | } 182 | }, 183 | "node_modules/ansi-styles": { 184 | "version": "4.3.0", 185 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 186 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 187 | "dev": true, 188 | "license": "MIT", 189 | "dependencies": { 190 | "color-convert": "^2.0.1" 191 | }, 192 | "engines": { 193 | "node": ">=8" 194 | }, 195 | "funding": { 196 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 197 | } 198 | }, 199 | "node_modules/anymatch": { 200 | "version": "3.1.3", 201 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", 202 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", 203 | "dev": true, 204 | "license": "ISC", 205 | "dependencies": { 206 | "normalize-path": "^3.0.0", 207 | "picomatch": "^2.0.4" 208 | }, 209 | "engines": { 210 | "node": ">= 8" 211 | } 212 | }, 213 | "node_modules/argparse": { 214 | "version": "2.0.1", 215 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 216 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 217 | "dev": true, 218 | "license": "Python-2.0" 219 | }, 220 | "node_modules/balanced-match": { 221 | "version": "1.0.2", 222 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 223 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 224 | "dev": true, 225 | "license": "MIT" 226 | }, 227 | "node_modules/binary-extensions": { 228 | "version": "2.3.0", 229 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", 230 | "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", 231 | "dev": true, 232 | "license": "MIT", 233 | "engines": { 234 | "node": ">=8" 235 | }, 236 | "funding": { 237 | "url": "https://github.com/sponsors/sindresorhus" 238 | } 239 | }, 240 | "node_modules/brace-expansion": { 241 | "version": "2.0.1", 242 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 243 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 244 | "dev": true, 245 | "license": "MIT", 246 | "dependencies": { 247 | "balanced-match": "^1.0.0" 248 | } 249 | }, 250 | "node_modules/braces": { 251 | "version": "3.0.3", 252 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", 253 | "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", 254 | "dev": true, 255 | "license": "MIT", 256 | "dependencies": { 257 | "fill-range": "^7.1.1" 258 | }, 259 | "engines": { 260 | "node": ">=8" 261 | } 262 | }, 263 | "node_modules/browser-stdout": { 264 | "version": "1.3.1", 265 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 266 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 267 | "dev": true 268 | }, 269 | "node_modules/camelcase": { 270 | "version": "6.3.0", 271 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", 272 | "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", 273 | "dev": true, 274 | "license": "MIT", 275 | "engines": { 276 | "node": ">=10" 277 | }, 278 | "funding": { 279 | "url": "https://github.com/sponsors/sindresorhus" 280 | } 281 | }, 282 | "node_modules/chalk": { 283 | "version": "4.1.2", 284 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 285 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 286 | "dev": true, 287 | "license": "MIT", 288 | "dependencies": { 289 | "ansi-styles": "^4.1.0", 290 | "supports-color": "^7.1.0" 291 | }, 292 | "engines": { 293 | "node": ">=10" 294 | }, 295 | "funding": { 296 | "url": "https://github.com/chalk/chalk?sponsor=1" 297 | } 298 | }, 299 | "node_modules/chalk/node_modules/supports-color": { 300 | "version": "7.2.0", 301 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 302 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 303 | "dev": true, 304 | "license": "MIT", 305 | "dependencies": { 306 | "has-flag": "^4.0.0" 307 | }, 308 | "engines": { 309 | "node": ">=8" 310 | } 311 | }, 312 | "node_modules/chokidar": { 313 | "version": "3.6.0", 314 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", 315 | "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", 316 | "dev": true, 317 | "license": "MIT", 318 | "dependencies": { 319 | "anymatch": "~3.1.2", 320 | "braces": "~3.0.2", 321 | "glob-parent": "~5.1.2", 322 | "is-binary-path": "~2.1.0", 323 | "is-glob": "~4.0.1", 324 | "normalize-path": "~3.0.0", 325 | "readdirp": "~3.6.0" 326 | }, 327 | "engines": { 328 | "node": ">= 8.10.0" 329 | }, 330 | "funding": { 331 | "url": "https://paulmillr.com/funding/" 332 | }, 333 | "optionalDependencies": { 334 | "fsevents": "~2.3.2" 335 | } 336 | }, 337 | "node_modules/cliui": { 338 | "version": "7.0.4", 339 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", 340 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", 341 | "dev": true, 342 | "license": "ISC", 343 | "dependencies": { 344 | "string-width": "^4.2.0", 345 | "strip-ansi": "^6.0.0", 346 | "wrap-ansi": "^7.0.0" 347 | } 348 | }, 349 | "node_modules/color-convert": { 350 | "version": "2.0.1", 351 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 352 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 353 | "dev": true, 354 | "license": "MIT", 355 | "dependencies": { 356 | "color-name": "~1.1.4" 357 | }, 358 | "engines": { 359 | "node": ">=7.0.0" 360 | } 361 | }, 362 | "node_modules/color-name": { 363 | "version": "1.1.4", 364 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 365 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 366 | "dev": true, 367 | "license": "MIT" 368 | }, 369 | "node_modules/cross-spawn": { 370 | "version": "7.0.6", 371 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", 372 | "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", 373 | "dev": true, 374 | "license": "MIT", 375 | "dependencies": { 376 | "path-key": "^3.1.0", 377 | "shebang-command": "^2.0.0", 378 | "which": "^2.0.1" 379 | }, 380 | "engines": { 381 | "node": ">= 8" 382 | } 383 | }, 384 | "node_modules/debug": { 385 | "version": "4.3.7", 386 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", 387 | "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", 388 | "dev": true, 389 | "license": "MIT", 390 | "dependencies": { 391 | "ms": "^2.1.3" 392 | }, 393 | "engines": { 394 | "node": ">=6.0" 395 | }, 396 | "peerDependenciesMeta": { 397 | "supports-color": { 398 | "optional": true 399 | } 400 | } 401 | }, 402 | "node_modules/decamelize": { 403 | "version": "4.0.0", 404 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", 405 | "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", 406 | "dev": true, 407 | "license": "MIT", 408 | "engines": { 409 | "node": ">=10" 410 | }, 411 | "funding": { 412 | "url": "https://github.com/sponsors/sindresorhus" 413 | } 414 | }, 415 | "node_modules/diff": { 416 | "version": "5.2.0", 417 | "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", 418 | "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", 419 | "dev": true, 420 | "license": "BSD-3-Clause", 421 | "engines": { 422 | "node": ">=0.3.1" 423 | } 424 | }, 425 | "node_modules/eastasianwidth": { 426 | "version": "0.2.0", 427 | "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", 428 | "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", 429 | "dev": true, 430 | "license": "MIT" 431 | }, 432 | "node_modules/emoji-regex": { 433 | "version": "8.0.0", 434 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 435 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 436 | "dev": true, 437 | "license": "MIT" 438 | }, 439 | "node_modules/entities": { 440 | "version": "4.5.0", 441 | "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", 442 | "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", 443 | "dev": true, 444 | "license": "BSD-2-Clause", 445 | "engines": { 446 | "node": ">=0.12" 447 | }, 448 | "funding": { 449 | "url": "https://github.com/fb55/entities?sponsor=1" 450 | } 451 | }, 452 | "node_modules/escalade": { 453 | "version": "3.2.0", 454 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", 455 | "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", 456 | "dev": true, 457 | "license": "MIT", 458 | "engines": { 459 | "node": ">=6" 460 | } 461 | }, 462 | "node_modules/escape-string-regexp": { 463 | "version": "4.0.0", 464 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 465 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 466 | "dev": true, 467 | "license": "MIT", 468 | "engines": { 469 | "node": ">=10" 470 | }, 471 | "funding": { 472 | "url": "https://github.com/sponsors/sindresorhus" 473 | } 474 | }, 475 | "node_modules/fill-range": { 476 | "version": "7.1.1", 477 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", 478 | "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", 479 | "dev": true, 480 | "license": "MIT", 481 | "dependencies": { 482 | "to-regex-range": "^5.0.1" 483 | }, 484 | "engines": { 485 | "node": ">=8" 486 | } 487 | }, 488 | "node_modules/find-up": { 489 | "version": "5.0.0", 490 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", 491 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 492 | "dev": true, 493 | "license": "MIT", 494 | "dependencies": { 495 | "locate-path": "^6.0.0", 496 | "path-exists": "^4.0.0" 497 | }, 498 | "engines": { 499 | "node": ">=10" 500 | }, 501 | "funding": { 502 | "url": "https://github.com/sponsors/sindresorhus" 503 | } 504 | }, 505 | "node_modules/flat": { 506 | "version": "5.0.2", 507 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", 508 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", 509 | "dev": true, 510 | "license": "BSD-3-Clause", 511 | "bin": { 512 | "flat": "cli.js" 513 | } 514 | }, 515 | "node_modules/foreground-child": { 516 | "version": "3.3.0", 517 | "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", 518 | "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", 519 | "dev": true, 520 | "license": "ISC", 521 | "dependencies": { 522 | "cross-spawn": "^7.0.0", 523 | "signal-exit": "^4.0.1" 524 | }, 525 | "engines": { 526 | "node": ">=14" 527 | }, 528 | "funding": { 529 | "url": "https://github.com/sponsors/isaacs" 530 | } 531 | }, 532 | "node_modules/fsevents": { 533 | "version": "2.3.3", 534 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", 535 | "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", 536 | "dev": true, 537 | "hasInstallScript": true, 538 | "license": "MIT", 539 | "optional": true, 540 | "os": [ 541 | "darwin" 542 | ], 543 | "engines": { 544 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 545 | } 546 | }, 547 | "node_modules/get-caller-file": { 548 | "version": "2.0.5", 549 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 550 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 551 | "dev": true, 552 | "license": "ISC", 553 | "engines": { 554 | "node": "6.* || 8.* || >= 10.*" 555 | } 556 | }, 557 | "node_modules/glob": { 558 | "version": "10.4.5", 559 | "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", 560 | "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", 561 | "dev": true, 562 | "license": "ISC", 563 | "dependencies": { 564 | "foreground-child": "^3.1.0", 565 | "jackspeak": "^3.1.2", 566 | "minimatch": "^9.0.4", 567 | "minipass": "^7.1.2", 568 | "package-json-from-dist": "^1.0.0", 569 | "path-scurry": "^1.11.1" 570 | }, 571 | "bin": { 572 | "glob": "dist/esm/bin.mjs" 573 | }, 574 | "funding": { 575 | "url": "https://github.com/sponsors/isaacs" 576 | } 577 | }, 578 | "node_modules/glob-parent": { 579 | "version": "5.1.2", 580 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 581 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 582 | "dev": true, 583 | "license": "ISC", 584 | "dependencies": { 585 | "is-glob": "^4.0.1" 586 | }, 587 | "engines": { 588 | "node": ">= 6" 589 | } 590 | }, 591 | "node_modules/glob/node_modules/minimatch": { 592 | "version": "9.0.5", 593 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", 594 | "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", 595 | "dev": true, 596 | "license": "ISC", 597 | "dependencies": { 598 | "brace-expansion": "^2.0.1" 599 | }, 600 | "engines": { 601 | "node": ">=16 || 14 >=14.17" 602 | }, 603 | "funding": { 604 | "url": "https://github.com/sponsors/isaacs" 605 | } 606 | }, 607 | "node_modules/has-flag": { 608 | "version": "4.0.0", 609 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 610 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 611 | "dev": true, 612 | "license": "MIT", 613 | "engines": { 614 | "node": ">=8" 615 | } 616 | }, 617 | "node_modules/he": { 618 | "version": "1.2.0", 619 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 620 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 621 | "dev": true, 622 | "license": "MIT", 623 | "bin": { 624 | "he": "bin/he" 625 | } 626 | }, 627 | "node_modules/is-binary-path": { 628 | "version": "2.1.0", 629 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 630 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 631 | "dev": true, 632 | "license": "MIT", 633 | "dependencies": { 634 | "binary-extensions": "^2.0.0" 635 | }, 636 | "engines": { 637 | "node": ">=8" 638 | } 639 | }, 640 | "node_modules/is-extglob": { 641 | "version": "2.1.1", 642 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 643 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 644 | "dev": true, 645 | "license": "MIT", 646 | "engines": { 647 | "node": ">=0.10.0" 648 | } 649 | }, 650 | "node_modules/is-fullwidth-code-point": { 651 | "version": "3.0.0", 652 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 653 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 654 | "dev": true, 655 | "license": "MIT", 656 | "engines": { 657 | "node": ">=8" 658 | } 659 | }, 660 | "node_modules/is-glob": { 661 | "version": "4.0.3", 662 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 663 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 664 | "dev": true, 665 | "license": "MIT", 666 | "dependencies": { 667 | "is-extglob": "^2.1.1" 668 | }, 669 | "engines": { 670 | "node": ">=0.10.0" 671 | } 672 | }, 673 | "node_modules/is-number": { 674 | "version": "7.0.0", 675 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 676 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 677 | "dev": true, 678 | "license": "MIT", 679 | "engines": { 680 | "node": ">=0.12.0" 681 | } 682 | }, 683 | "node_modules/is-plain-obj": { 684 | "version": "2.1.0", 685 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", 686 | "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", 687 | "dev": true, 688 | "license": "MIT", 689 | "engines": { 690 | "node": ">=8" 691 | } 692 | }, 693 | "node_modules/is-unicode-supported": { 694 | "version": "0.1.0", 695 | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", 696 | "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", 697 | "dev": true, 698 | "license": "MIT", 699 | "engines": { 700 | "node": ">=10" 701 | }, 702 | "funding": { 703 | "url": "https://github.com/sponsors/sindresorhus" 704 | } 705 | }, 706 | "node_modules/isexe": { 707 | "version": "2.0.0", 708 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 709 | "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", 710 | "dev": true, 711 | "license": "ISC" 712 | }, 713 | "node_modules/jackspeak": { 714 | "version": "3.4.3", 715 | "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", 716 | "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", 717 | "dev": true, 718 | "license": "BlueOak-1.0.0", 719 | "dependencies": { 720 | "@isaacs/cliui": "^8.0.2" 721 | }, 722 | "funding": { 723 | "url": "https://github.com/sponsors/isaacs" 724 | }, 725 | "optionalDependencies": { 726 | "@pkgjs/parseargs": "^0.11.0" 727 | } 728 | }, 729 | "node_modules/js-yaml": { 730 | "version": "4.1.0", 731 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", 732 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", 733 | "dev": true, 734 | "license": "MIT", 735 | "dependencies": { 736 | "argparse": "^2.0.1" 737 | }, 738 | "bin": { 739 | "js-yaml": "bin/js-yaml.js" 740 | } 741 | }, 742 | "node_modules/linkify-it": { 743 | "version": "5.0.0", 744 | "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", 745 | "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", 746 | "dev": true, 747 | "license": "MIT", 748 | "dependencies": { 749 | "uc.micro": "^2.0.0" 750 | } 751 | }, 752 | "node_modules/locate-path": { 753 | "version": "6.0.0", 754 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", 755 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 756 | "dev": true, 757 | "license": "MIT", 758 | "dependencies": { 759 | "p-locate": "^5.0.0" 760 | }, 761 | "engines": { 762 | "node": ">=10" 763 | }, 764 | "funding": { 765 | "url": "https://github.com/sponsors/sindresorhus" 766 | } 767 | }, 768 | "node_modules/log-symbols": { 769 | "version": "4.1.0", 770 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", 771 | "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", 772 | "dev": true, 773 | "license": "MIT", 774 | "dependencies": { 775 | "chalk": "^4.1.0", 776 | "is-unicode-supported": "^0.1.0" 777 | }, 778 | "engines": { 779 | "node": ">=10" 780 | }, 781 | "funding": { 782 | "url": "https://github.com/sponsors/sindresorhus" 783 | } 784 | }, 785 | "node_modules/lru-cache": { 786 | "version": "10.4.3", 787 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", 788 | "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", 789 | "dev": true, 790 | "license": "ISC" 791 | }, 792 | "node_modules/markdown-it": { 793 | "version": "14.1.0", 794 | "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", 795 | "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", 796 | "dev": true, 797 | "license": "MIT", 798 | "dependencies": { 799 | "argparse": "^2.0.1", 800 | "entities": "^4.4.0", 801 | "linkify-it": "^5.0.0", 802 | "mdurl": "^2.0.0", 803 | "punycode.js": "^2.3.1", 804 | "uc.micro": "^2.1.0" 805 | }, 806 | "bin": { 807 | "markdown-it": "bin/markdown-it.mjs" 808 | } 809 | }, 810 | "node_modules/markdown-it-anchor": { 811 | "version": "9.2.0", 812 | "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-9.2.0.tgz", 813 | "integrity": "sha512-sa2ErMQ6kKOA4l31gLGYliFQrMKkqSO0ZJgGhDHKijPf0pNFM9vghjAh3gn26pS4JDRs7Iwa9S36gxm3vgZTzg==", 814 | "dev": true, 815 | "license": "Unlicense", 816 | "peerDependencies": { 817 | "@types/markdown-it": "*", 818 | "markdown-it": "*" 819 | } 820 | }, 821 | "node_modules/markdown-it-attrs": { 822 | "version": "4.3.1", 823 | "resolved": "https://registry.npmjs.org/markdown-it-attrs/-/markdown-it-attrs-4.3.1.tgz", 824 | "integrity": "sha512-/ko6cba+H6gdZ0DOw7BbNMZtfuJTRp9g/IrGIuz8lYc/EfnmWRpaR3CFPnNbVz0LDvF8Gf1hFGPqrQqq7De0rg==", 825 | "dev": true, 826 | "license": "MIT", 827 | "engines": { 828 | "node": ">=6" 829 | }, 830 | "peerDependencies": { 831 | "markdown-it": ">= 9.0.0" 832 | } 833 | }, 834 | "node_modules/mdurl": { 835 | "version": "2.0.0", 836 | "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", 837 | "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", 838 | "dev": true, 839 | "license": "MIT" 840 | }, 841 | "node_modules/minimatch": { 842 | "version": "5.1.6", 843 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", 844 | "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", 845 | "dev": true, 846 | "license": "ISC", 847 | "dependencies": { 848 | "brace-expansion": "^2.0.1" 849 | }, 850 | "engines": { 851 | "node": ">=10" 852 | } 853 | }, 854 | "node_modules/minipass": { 855 | "version": "7.1.2", 856 | "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", 857 | "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", 858 | "dev": true, 859 | "license": "ISC", 860 | "engines": { 861 | "node": ">=16 || 14 >=14.17" 862 | } 863 | }, 864 | "node_modules/mocha": { 865 | "version": "11.0.1", 866 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.0.1.tgz", 867 | "integrity": "sha512-+3GkODfsDG71KSCQhc4IekSW+ItCK/kiez1Z28ksWvYhKXV/syxMlerR/sC7whDp7IyreZ4YxceMLdTs5hQE8A==", 868 | "dev": true, 869 | "license": "MIT", 870 | "dependencies": { 871 | "ansi-colors": "^4.1.3", 872 | "browser-stdout": "^1.3.1", 873 | "chokidar": "^3.5.3", 874 | "debug": "^4.3.5", 875 | "diff": "^5.2.0", 876 | "escape-string-regexp": "^4.0.0", 877 | "find-up": "^5.0.0", 878 | "glob": "^10.4.5", 879 | "he": "^1.2.0", 880 | "js-yaml": "^4.1.0", 881 | "log-symbols": "^4.1.0", 882 | "minimatch": "^5.1.6", 883 | "ms": "^2.1.3", 884 | "serialize-javascript": "^6.0.2", 885 | "strip-json-comments": "^3.1.1", 886 | "supports-color": "^8.1.1", 887 | "workerpool": "^6.5.1", 888 | "yargs": "^16.2.0", 889 | "yargs-parser": "^20.2.9", 890 | "yargs-unparser": "^2.0.0" 891 | }, 892 | "bin": { 893 | "_mocha": "bin/_mocha", 894 | "mocha": "bin/mocha.js" 895 | }, 896 | "engines": { 897 | "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 898 | } 899 | }, 900 | "node_modules/ms": { 901 | "version": "2.1.3", 902 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 903 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 904 | "dev": true, 905 | "license": "MIT" 906 | }, 907 | "node_modules/normalize-path": { 908 | "version": "3.0.0", 909 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 910 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 911 | "dev": true, 912 | "license": "MIT", 913 | "engines": { 914 | "node": ">=0.10.0" 915 | } 916 | }, 917 | "node_modules/p-limit": { 918 | "version": "3.1.0", 919 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", 920 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 921 | "dev": true, 922 | "license": "MIT", 923 | "dependencies": { 924 | "yocto-queue": "^0.1.0" 925 | }, 926 | "engines": { 927 | "node": ">=10" 928 | }, 929 | "funding": { 930 | "url": "https://github.com/sponsors/sindresorhus" 931 | } 932 | }, 933 | "node_modules/p-locate": { 934 | "version": "5.0.0", 935 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", 936 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 937 | "dev": true, 938 | "license": "MIT", 939 | "dependencies": { 940 | "p-limit": "^3.0.2" 941 | }, 942 | "engines": { 943 | "node": ">=10" 944 | }, 945 | "funding": { 946 | "url": "https://github.com/sponsors/sindresorhus" 947 | } 948 | }, 949 | "node_modules/package-json-from-dist": { 950 | "version": "1.0.1", 951 | "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", 952 | "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", 953 | "dev": true, 954 | "license": "BlueOak-1.0.0" 955 | }, 956 | "node_modules/path-exists": { 957 | "version": "4.0.0", 958 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 959 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 960 | "dev": true, 961 | "license": "MIT", 962 | "engines": { 963 | "node": ">=8" 964 | } 965 | }, 966 | "node_modules/path-key": { 967 | "version": "3.1.1", 968 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", 969 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", 970 | "dev": true, 971 | "license": "MIT", 972 | "engines": { 973 | "node": ">=8" 974 | } 975 | }, 976 | "node_modules/path-scurry": { 977 | "version": "1.11.1", 978 | "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", 979 | "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", 980 | "dev": true, 981 | "license": "BlueOak-1.0.0", 982 | "dependencies": { 983 | "lru-cache": "^10.2.0", 984 | "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" 985 | }, 986 | "engines": { 987 | "node": ">=16 || 14 >=14.18" 988 | }, 989 | "funding": { 990 | "url": "https://github.com/sponsors/isaacs" 991 | } 992 | }, 993 | "node_modules/picomatch": { 994 | "version": "2.3.1", 995 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 996 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 997 | "dev": true, 998 | "license": "MIT", 999 | "engines": { 1000 | "node": ">=8.6" 1001 | }, 1002 | "funding": { 1003 | "url": "https://github.com/sponsors/jonschlinkert" 1004 | } 1005 | }, 1006 | "node_modules/punycode.js": { 1007 | "version": "2.3.1", 1008 | "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", 1009 | "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", 1010 | "dev": true, 1011 | "license": "MIT", 1012 | "engines": { 1013 | "node": ">=6" 1014 | } 1015 | }, 1016 | "node_modules/randombytes": { 1017 | "version": "2.1.0", 1018 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 1019 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 1020 | "dev": true, 1021 | "license": "MIT", 1022 | "dependencies": { 1023 | "safe-buffer": "^5.1.0" 1024 | } 1025 | }, 1026 | "node_modules/readdirp": { 1027 | "version": "3.6.0", 1028 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 1029 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 1030 | "dev": true, 1031 | "license": "MIT", 1032 | "dependencies": { 1033 | "picomatch": "^2.2.1" 1034 | }, 1035 | "engines": { 1036 | "node": ">=8.10.0" 1037 | } 1038 | }, 1039 | "node_modules/require-directory": { 1040 | "version": "2.1.1", 1041 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 1042 | "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", 1043 | "dev": true, 1044 | "license": "MIT", 1045 | "engines": { 1046 | "node": ">=0.10.0" 1047 | } 1048 | }, 1049 | "node_modules/safe-buffer": { 1050 | "version": "5.2.1", 1051 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1052 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 1053 | "dev": true, 1054 | "funding": [ 1055 | { 1056 | "type": "github", 1057 | "url": "https://github.com/sponsors/feross" 1058 | }, 1059 | { 1060 | "type": "patreon", 1061 | "url": "https://www.patreon.com/feross" 1062 | }, 1063 | { 1064 | "type": "consulting", 1065 | "url": "https://feross.org/support" 1066 | } 1067 | ], 1068 | "license": "MIT" 1069 | }, 1070 | "node_modules/serialize-javascript": { 1071 | "version": "6.0.2", 1072 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", 1073 | "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", 1074 | "dev": true, 1075 | "license": "BSD-3-Clause", 1076 | "dependencies": { 1077 | "randombytes": "^2.1.0" 1078 | } 1079 | }, 1080 | "node_modules/shebang-command": { 1081 | "version": "2.0.0", 1082 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", 1083 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", 1084 | "dev": true, 1085 | "license": "MIT", 1086 | "dependencies": { 1087 | "shebang-regex": "^3.0.0" 1088 | }, 1089 | "engines": { 1090 | "node": ">=8" 1091 | } 1092 | }, 1093 | "node_modules/shebang-regex": { 1094 | "version": "3.0.0", 1095 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", 1096 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", 1097 | "dev": true, 1098 | "license": "MIT", 1099 | "engines": { 1100 | "node": ">=8" 1101 | } 1102 | }, 1103 | "node_modules/signal-exit": { 1104 | "version": "4.1.0", 1105 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", 1106 | "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", 1107 | "dev": true, 1108 | "license": "ISC", 1109 | "engines": { 1110 | "node": ">=14" 1111 | }, 1112 | "funding": { 1113 | "url": "https://github.com/sponsors/isaacs" 1114 | } 1115 | }, 1116 | "node_modules/string-width": { 1117 | "version": "4.2.3", 1118 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 1119 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 1120 | "dev": true, 1121 | "license": "MIT", 1122 | "dependencies": { 1123 | "emoji-regex": "^8.0.0", 1124 | "is-fullwidth-code-point": "^3.0.0", 1125 | "strip-ansi": "^6.0.1" 1126 | }, 1127 | "engines": { 1128 | "node": ">=8" 1129 | } 1130 | }, 1131 | "node_modules/string-width-cjs": { 1132 | "name": "string-width", 1133 | "version": "4.2.3", 1134 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 1135 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 1136 | "dev": true, 1137 | "license": "MIT", 1138 | "dependencies": { 1139 | "emoji-regex": "^8.0.0", 1140 | "is-fullwidth-code-point": "^3.0.0", 1141 | "strip-ansi": "^6.0.1" 1142 | }, 1143 | "engines": { 1144 | "node": ">=8" 1145 | } 1146 | }, 1147 | "node_modules/strip-ansi": { 1148 | "version": "6.0.1", 1149 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 1150 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 1151 | "dev": true, 1152 | "license": "MIT", 1153 | "dependencies": { 1154 | "ansi-regex": "^5.0.1" 1155 | }, 1156 | "engines": { 1157 | "node": ">=8" 1158 | } 1159 | }, 1160 | "node_modules/strip-ansi-cjs": { 1161 | "name": "strip-ansi", 1162 | "version": "6.0.1", 1163 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 1164 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 1165 | "dev": true, 1166 | "license": "MIT", 1167 | "dependencies": { 1168 | "ansi-regex": "^5.0.1" 1169 | }, 1170 | "engines": { 1171 | "node": ">=8" 1172 | } 1173 | }, 1174 | "node_modules/strip-json-comments": { 1175 | "version": "3.1.1", 1176 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 1177 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 1178 | "dev": true, 1179 | "license": "MIT", 1180 | "engines": { 1181 | "node": ">=8" 1182 | }, 1183 | "funding": { 1184 | "url": "https://github.com/sponsors/sindresorhus" 1185 | } 1186 | }, 1187 | "node_modules/supports-color": { 1188 | "version": "8.1.1", 1189 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", 1190 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", 1191 | "dev": true, 1192 | "license": "MIT", 1193 | "dependencies": { 1194 | "has-flag": "^4.0.0" 1195 | }, 1196 | "engines": { 1197 | "node": ">=10" 1198 | }, 1199 | "funding": { 1200 | "url": "https://github.com/chalk/supports-color?sponsor=1" 1201 | } 1202 | }, 1203 | "node_modules/to-regex-range": { 1204 | "version": "5.0.1", 1205 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1206 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1207 | "dev": true, 1208 | "license": "MIT", 1209 | "dependencies": { 1210 | "is-number": "^7.0.0" 1211 | }, 1212 | "engines": { 1213 | "node": ">=8.0" 1214 | } 1215 | }, 1216 | "node_modules/uc.micro": { 1217 | "version": "2.1.0", 1218 | "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", 1219 | "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", 1220 | "dev": true, 1221 | "license": "MIT" 1222 | }, 1223 | "node_modules/which": { 1224 | "version": "2.0.2", 1225 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 1226 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 1227 | "dev": true, 1228 | "license": "ISC", 1229 | "dependencies": { 1230 | "isexe": "^2.0.0" 1231 | }, 1232 | "bin": { 1233 | "node-which": "bin/node-which" 1234 | }, 1235 | "engines": { 1236 | "node": ">= 8" 1237 | } 1238 | }, 1239 | "node_modules/workerpool": { 1240 | "version": "6.5.1", 1241 | "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", 1242 | "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", 1243 | "dev": true, 1244 | "license": "Apache-2.0" 1245 | }, 1246 | "node_modules/wrap-ansi": { 1247 | "version": "7.0.0", 1248 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 1249 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 1250 | "dev": true, 1251 | "license": "MIT", 1252 | "dependencies": { 1253 | "ansi-styles": "^4.0.0", 1254 | "string-width": "^4.1.0", 1255 | "strip-ansi": "^6.0.0" 1256 | }, 1257 | "engines": { 1258 | "node": ">=10" 1259 | }, 1260 | "funding": { 1261 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 1262 | } 1263 | }, 1264 | "node_modules/wrap-ansi-cjs": { 1265 | "name": "wrap-ansi", 1266 | "version": "7.0.0", 1267 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 1268 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 1269 | "dev": true, 1270 | "license": "MIT", 1271 | "dependencies": { 1272 | "ansi-styles": "^4.0.0", 1273 | "string-width": "^4.1.0", 1274 | "strip-ansi": "^6.0.0" 1275 | }, 1276 | "engines": { 1277 | "node": ">=10" 1278 | }, 1279 | "funding": { 1280 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 1281 | } 1282 | }, 1283 | "node_modules/y18n": { 1284 | "version": "5.0.8", 1285 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", 1286 | "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", 1287 | "dev": true, 1288 | "license": "ISC", 1289 | "engines": { 1290 | "node": ">=10" 1291 | } 1292 | }, 1293 | "node_modules/yargs": { 1294 | "version": "16.2.0", 1295 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", 1296 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", 1297 | "dev": true, 1298 | "license": "MIT", 1299 | "dependencies": { 1300 | "cliui": "^7.0.2", 1301 | "escalade": "^3.1.1", 1302 | "get-caller-file": "^2.0.5", 1303 | "require-directory": "^2.1.1", 1304 | "string-width": "^4.2.0", 1305 | "y18n": "^5.0.5", 1306 | "yargs-parser": "^20.2.2" 1307 | }, 1308 | "engines": { 1309 | "node": ">=10" 1310 | } 1311 | }, 1312 | "node_modules/yargs-parser": { 1313 | "version": "20.2.9", 1314 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", 1315 | "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", 1316 | "dev": true, 1317 | "license": "ISC", 1318 | "engines": { 1319 | "node": ">=10" 1320 | } 1321 | }, 1322 | "node_modules/yargs-unparser": { 1323 | "version": "2.0.0", 1324 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", 1325 | "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", 1326 | "dev": true, 1327 | "license": "MIT", 1328 | "dependencies": { 1329 | "camelcase": "^6.0.0", 1330 | "decamelize": "^4.0.0", 1331 | "flat": "^5.0.2", 1332 | "is-plain-obj": "^2.1.0" 1333 | }, 1334 | "engines": { 1335 | "node": ">=10" 1336 | } 1337 | }, 1338 | "node_modules/yocto-queue": { 1339 | "version": "0.1.0", 1340 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", 1341 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", 1342 | "dev": true, 1343 | "license": "MIT", 1344 | "engines": { 1345 | "node": ">=10" 1346 | }, 1347 | "funding": { 1348 | "url": "https://github.com/sponsors/sindresorhus" 1349 | } 1350 | } 1351 | }, 1352 | "dependencies": { 1353 | "@isaacs/cliui": { 1354 | "version": "8.0.2", 1355 | "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", 1356 | "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", 1357 | "dev": true, 1358 | "requires": { 1359 | "string-width": "^5.1.2", 1360 | "string-width-cjs": "npm:string-width@^4.2.0", 1361 | "strip-ansi": "^7.0.1", 1362 | "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", 1363 | "wrap-ansi": "^8.1.0", 1364 | "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" 1365 | }, 1366 | "dependencies": { 1367 | "ansi-regex": { 1368 | "version": "6.1.0", 1369 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", 1370 | "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", 1371 | "dev": true 1372 | }, 1373 | "ansi-styles": { 1374 | "version": "6.2.1", 1375 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", 1376 | "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", 1377 | "dev": true 1378 | }, 1379 | "emoji-regex": { 1380 | "version": "9.2.2", 1381 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", 1382 | "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", 1383 | "dev": true 1384 | }, 1385 | "string-width": { 1386 | "version": "5.1.2", 1387 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", 1388 | "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", 1389 | "dev": true, 1390 | "requires": { 1391 | "eastasianwidth": "^0.2.0", 1392 | "emoji-regex": "^9.2.2", 1393 | "strip-ansi": "^7.0.1" 1394 | } 1395 | }, 1396 | "strip-ansi": { 1397 | "version": "7.1.0", 1398 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", 1399 | "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", 1400 | "dev": true, 1401 | "requires": { 1402 | "ansi-regex": "^6.0.1" 1403 | } 1404 | }, 1405 | "wrap-ansi": { 1406 | "version": "8.1.0", 1407 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", 1408 | "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", 1409 | "dev": true, 1410 | "requires": { 1411 | "ansi-styles": "^6.1.0", 1412 | "string-width": "^5.0.1", 1413 | "strip-ansi": "^7.0.1" 1414 | } 1415 | } 1416 | } 1417 | }, 1418 | "@pkgjs/parseargs": { 1419 | "version": "0.11.0", 1420 | "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", 1421 | "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", 1422 | "dev": true, 1423 | "optional": true 1424 | }, 1425 | "@types/linkify-it": { 1426 | "version": "5.0.0", 1427 | "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", 1428 | "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", 1429 | "dev": true, 1430 | "peer": true 1431 | }, 1432 | "@types/markdown-it": { 1433 | "version": "14.1.2", 1434 | "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.2.tgz", 1435 | "integrity": "sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==", 1436 | "dev": true, 1437 | "peer": true, 1438 | "requires": { 1439 | "@types/linkify-it": "^5", 1440 | "@types/mdurl": "^2" 1441 | } 1442 | }, 1443 | "@types/mdurl": { 1444 | "version": "2.0.0", 1445 | "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", 1446 | "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", 1447 | "dev": true, 1448 | "peer": true 1449 | }, 1450 | "ansi-colors": { 1451 | "version": "4.1.3", 1452 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", 1453 | "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", 1454 | "dev": true 1455 | }, 1456 | "ansi-regex": { 1457 | "version": "5.0.1", 1458 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 1459 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 1460 | "dev": true 1461 | }, 1462 | "ansi-styles": { 1463 | "version": "4.3.0", 1464 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 1465 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 1466 | "dev": true, 1467 | "requires": { 1468 | "color-convert": "^2.0.1" 1469 | } 1470 | }, 1471 | "anymatch": { 1472 | "version": "3.1.3", 1473 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", 1474 | "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", 1475 | "dev": true, 1476 | "requires": { 1477 | "normalize-path": "^3.0.0", 1478 | "picomatch": "^2.0.4" 1479 | } 1480 | }, 1481 | "argparse": { 1482 | "version": "2.0.1", 1483 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 1484 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 1485 | "dev": true 1486 | }, 1487 | "balanced-match": { 1488 | "version": "1.0.2", 1489 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 1490 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 1491 | "dev": true 1492 | }, 1493 | "binary-extensions": { 1494 | "version": "2.3.0", 1495 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", 1496 | "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", 1497 | "dev": true 1498 | }, 1499 | "brace-expansion": { 1500 | "version": "2.0.1", 1501 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 1502 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 1503 | "dev": true, 1504 | "requires": { 1505 | "balanced-match": "^1.0.0" 1506 | } 1507 | }, 1508 | "braces": { 1509 | "version": "3.0.3", 1510 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", 1511 | "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", 1512 | "dev": true, 1513 | "requires": { 1514 | "fill-range": "^7.1.1" 1515 | } 1516 | }, 1517 | "browser-stdout": { 1518 | "version": "1.3.1", 1519 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 1520 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 1521 | "dev": true 1522 | }, 1523 | "camelcase": { 1524 | "version": "6.3.0", 1525 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", 1526 | "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", 1527 | "dev": true 1528 | }, 1529 | "chalk": { 1530 | "version": "4.1.2", 1531 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 1532 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 1533 | "dev": true, 1534 | "requires": { 1535 | "ansi-styles": "^4.1.0", 1536 | "supports-color": "^7.1.0" 1537 | }, 1538 | "dependencies": { 1539 | "supports-color": { 1540 | "version": "7.2.0", 1541 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 1542 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 1543 | "dev": true, 1544 | "requires": { 1545 | "has-flag": "^4.0.0" 1546 | } 1547 | } 1548 | } 1549 | }, 1550 | "chokidar": { 1551 | "version": "3.6.0", 1552 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", 1553 | "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", 1554 | "dev": true, 1555 | "requires": { 1556 | "anymatch": "~3.1.2", 1557 | "braces": "~3.0.2", 1558 | "fsevents": "~2.3.2", 1559 | "glob-parent": "~5.1.2", 1560 | "is-binary-path": "~2.1.0", 1561 | "is-glob": "~4.0.1", 1562 | "normalize-path": "~3.0.0", 1563 | "readdirp": "~3.6.0" 1564 | } 1565 | }, 1566 | "cliui": { 1567 | "version": "7.0.4", 1568 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", 1569 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", 1570 | "dev": true, 1571 | "requires": { 1572 | "string-width": "^4.2.0", 1573 | "strip-ansi": "^6.0.0", 1574 | "wrap-ansi": "^7.0.0" 1575 | } 1576 | }, 1577 | "color-convert": { 1578 | "version": "2.0.1", 1579 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 1580 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 1581 | "dev": true, 1582 | "requires": { 1583 | "color-name": "~1.1.4" 1584 | } 1585 | }, 1586 | "color-name": { 1587 | "version": "1.1.4", 1588 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 1589 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 1590 | "dev": true 1591 | }, 1592 | "cross-spawn": { 1593 | "version": "7.0.6", 1594 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", 1595 | "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", 1596 | "dev": true, 1597 | "requires": { 1598 | "path-key": "^3.1.0", 1599 | "shebang-command": "^2.0.0", 1600 | "which": "^2.0.1" 1601 | } 1602 | }, 1603 | "debug": { 1604 | "version": "4.3.7", 1605 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", 1606 | "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", 1607 | "dev": true, 1608 | "requires": { 1609 | "ms": "^2.1.3" 1610 | } 1611 | }, 1612 | "decamelize": { 1613 | "version": "4.0.0", 1614 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", 1615 | "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", 1616 | "dev": true 1617 | }, 1618 | "diff": { 1619 | "version": "5.2.0", 1620 | "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", 1621 | "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", 1622 | "dev": true 1623 | }, 1624 | "eastasianwidth": { 1625 | "version": "0.2.0", 1626 | "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", 1627 | "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", 1628 | "dev": true 1629 | }, 1630 | "emoji-regex": { 1631 | "version": "8.0.0", 1632 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 1633 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 1634 | "dev": true 1635 | }, 1636 | "entities": { 1637 | "version": "4.5.0", 1638 | "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", 1639 | "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", 1640 | "dev": true 1641 | }, 1642 | "escalade": { 1643 | "version": "3.2.0", 1644 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", 1645 | "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", 1646 | "dev": true 1647 | }, 1648 | "escape-string-regexp": { 1649 | "version": "4.0.0", 1650 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 1651 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 1652 | "dev": true 1653 | }, 1654 | "fill-range": { 1655 | "version": "7.1.1", 1656 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", 1657 | "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", 1658 | "dev": true, 1659 | "requires": { 1660 | "to-regex-range": "^5.0.1" 1661 | } 1662 | }, 1663 | "find-up": { 1664 | "version": "5.0.0", 1665 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", 1666 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 1667 | "dev": true, 1668 | "requires": { 1669 | "locate-path": "^6.0.0", 1670 | "path-exists": "^4.0.0" 1671 | } 1672 | }, 1673 | "flat": { 1674 | "version": "5.0.2", 1675 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", 1676 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", 1677 | "dev": true 1678 | }, 1679 | "foreground-child": { 1680 | "version": "3.3.0", 1681 | "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", 1682 | "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", 1683 | "dev": true, 1684 | "requires": { 1685 | "cross-spawn": "^7.0.0", 1686 | "signal-exit": "^4.0.1" 1687 | } 1688 | }, 1689 | "fsevents": { 1690 | "version": "2.3.3", 1691 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", 1692 | "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", 1693 | "dev": true, 1694 | "optional": true 1695 | }, 1696 | "get-caller-file": { 1697 | "version": "2.0.5", 1698 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 1699 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 1700 | "dev": true 1701 | }, 1702 | "glob": { 1703 | "version": "10.4.5", 1704 | "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", 1705 | "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", 1706 | "dev": true, 1707 | "requires": { 1708 | "foreground-child": "^3.1.0", 1709 | "jackspeak": "^3.1.2", 1710 | "minimatch": "^9.0.4", 1711 | "minipass": "^7.1.2", 1712 | "package-json-from-dist": "^1.0.0", 1713 | "path-scurry": "^1.11.1" 1714 | }, 1715 | "dependencies": { 1716 | "minimatch": { 1717 | "version": "9.0.5", 1718 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", 1719 | "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", 1720 | "dev": true, 1721 | "requires": { 1722 | "brace-expansion": "^2.0.1" 1723 | } 1724 | } 1725 | } 1726 | }, 1727 | "glob-parent": { 1728 | "version": "5.1.2", 1729 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 1730 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 1731 | "dev": true, 1732 | "requires": { 1733 | "is-glob": "^4.0.1" 1734 | } 1735 | }, 1736 | "has-flag": { 1737 | "version": "4.0.0", 1738 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 1739 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 1740 | "dev": true 1741 | }, 1742 | "he": { 1743 | "version": "1.2.0", 1744 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 1745 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 1746 | "dev": true 1747 | }, 1748 | "is-binary-path": { 1749 | "version": "2.1.0", 1750 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 1751 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 1752 | "dev": true, 1753 | "requires": { 1754 | "binary-extensions": "^2.0.0" 1755 | } 1756 | }, 1757 | "is-extglob": { 1758 | "version": "2.1.1", 1759 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 1760 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 1761 | "dev": true 1762 | }, 1763 | "is-fullwidth-code-point": { 1764 | "version": "3.0.0", 1765 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 1766 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 1767 | "dev": true 1768 | }, 1769 | "is-glob": { 1770 | "version": "4.0.3", 1771 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 1772 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 1773 | "dev": true, 1774 | "requires": { 1775 | "is-extglob": "^2.1.1" 1776 | } 1777 | }, 1778 | "is-number": { 1779 | "version": "7.0.0", 1780 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 1781 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 1782 | "dev": true 1783 | }, 1784 | "is-plain-obj": { 1785 | "version": "2.1.0", 1786 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", 1787 | "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", 1788 | "dev": true 1789 | }, 1790 | "is-unicode-supported": { 1791 | "version": "0.1.0", 1792 | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", 1793 | "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", 1794 | "dev": true 1795 | }, 1796 | "isexe": { 1797 | "version": "2.0.0", 1798 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 1799 | "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", 1800 | "dev": true 1801 | }, 1802 | "jackspeak": { 1803 | "version": "3.4.3", 1804 | "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", 1805 | "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", 1806 | "dev": true, 1807 | "requires": { 1808 | "@isaacs/cliui": "^8.0.2", 1809 | "@pkgjs/parseargs": "^0.11.0" 1810 | } 1811 | }, 1812 | "js-yaml": { 1813 | "version": "4.1.0", 1814 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", 1815 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", 1816 | "dev": true, 1817 | "requires": { 1818 | "argparse": "^2.0.1" 1819 | } 1820 | }, 1821 | "linkify-it": { 1822 | "version": "5.0.0", 1823 | "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", 1824 | "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", 1825 | "dev": true, 1826 | "requires": { 1827 | "uc.micro": "^2.0.0" 1828 | } 1829 | }, 1830 | "locate-path": { 1831 | "version": "6.0.0", 1832 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", 1833 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 1834 | "dev": true, 1835 | "requires": { 1836 | "p-locate": "^5.0.0" 1837 | } 1838 | }, 1839 | "log-symbols": { 1840 | "version": "4.1.0", 1841 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", 1842 | "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", 1843 | "dev": true, 1844 | "requires": { 1845 | "chalk": "^4.1.0", 1846 | "is-unicode-supported": "^0.1.0" 1847 | } 1848 | }, 1849 | "lru-cache": { 1850 | "version": "10.4.3", 1851 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", 1852 | "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", 1853 | "dev": true 1854 | }, 1855 | "markdown-it": { 1856 | "version": "14.1.0", 1857 | "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", 1858 | "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", 1859 | "dev": true, 1860 | "requires": { 1861 | "argparse": "^2.0.1", 1862 | "entities": "^4.4.0", 1863 | "linkify-it": "^5.0.0", 1864 | "mdurl": "^2.0.0", 1865 | "punycode.js": "^2.3.1", 1866 | "uc.micro": "^2.1.0" 1867 | } 1868 | }, 1869 | "markdown-it-anchor": { 1870 | "version": "9.2.0", 1871 | "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-9.2.0.tgz", 1872 | "integrity": "sha512-sa2ErMQ6kKOA4l31gLGYliFQrMKkqSO0ZJgGhDHKijPf0pNFM9vghjAh3gn26pS4JDRs7Iwa9S36gxm3vgZTzg==", 1873 | "dev": true, 1874 | "requires": {} 1875 | }, 1876 | "markdown-it-attrs": { 1877 | "version": "4.3.1", 1878 | "resolved": "https://registry.npmjs.org/markdown-it-attrs/-/markdown-it-attrs-4.3.1.tgz", 1879 | "integrity": "sha512-/ko6cba+H6gdZ0DOw7BbNMZtfuJTRp9g/IrGIuz8lYc/EfnmWRpaR3CFPnNbVz0LDvF8Gf1hFGPqrQqq7De0rg==", 1880 | "dev": true, 1881 | "requires": {} 1882 | }, 1883 | "mdurl": { 1884 | "version": "2.0.0", 1885 | "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", 1886 | "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", 1887 | "dev": true 1888 | }, 1889 | "minimatch": { 1890 | "version": "5.1.6", 1891 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", 1892 | "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", 1893 | "dev": true, 1894 | "requires": { 1895 | "brace-expansion": "^2.0.1" 1896 | } 1897 | }, 1898 | "minipass": { 1899 | "version": "7.1.2", 1900 | "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", 1901 | "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", 1902 | "dev": true 1903 | }, 1904 | "mocha": { 1905 | "version": "11.0.1", 1906 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.0.1.tgz", 1907 | "integrity": "sha512-+3GkODfsDG71KSCQhc4IekSW+ItCK/kiez1Z28ksWvYhKXV/syxMlerR/sC7whDp7IyreZ4YxceMLdTs5hQE8A==", 1908 | "dev": true, 1909 | "requires": { 1910 | "ansi-colors": "^4.1.3", 1911 | "browser-stdout": "^1.3.1", 1912 | "chokidar": "^3.5.3", 1913 | "debug": "^4.3.5", 1914 | "diff": "^5.2.0", 1915 | "escape-string-regexp": "^4.0.0", 1916 | "find-up": "^5.0.0", 1917 | "glob": "^10.4.5", 1918 | "he": "^1.2.0", 1919 | "js-yaml": "^4.1.0", 1920 | "log-symbols": "^4.1.0", 1921 | "minimatch": "^5.1.6", 1922 | "ms": "^2.1.3", 1923 | "serialize-javascript": "^6.0.2", 1924 | "strip-json-comments": "^3.1.1", 1925 | "supports-color": "^8.1.1", 1926 | "workerpool": "^6.5.1", 1927 | "yargs": "^16.2.0", 1928 | "yargs-parser": "^20.2.9", 1929 | "yargs-unparser": "^2.0.0" 1930 | } 1931 | }, 1932 | "ms": { 1933 | "version": "2.1.3", 1934 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1935 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 1936 | "dev": true 1937 | }, 1938 | "normalize-path": { 1939 | "version": "3.0.0", 1940 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 1941 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 1942 | "dev": true 1943 | }, 1944 | "p-limit": { 1945 | "version": "3.1.0", 1946 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", 1947 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 1948 | "dev": true, 1949 | "requires": { 1950 | "yocto-queue": "^0.1.0" 1951 | } 1952 | }, 1953 | "p-locate": { 1954 | "version": "5.0.0", 1955 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", 1956 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 1957 | "dev": true, 1958 | "requires": { 1959 | "p-limit": "^3.0.2" 1960 | } 1961 | }, 1962 | "package-json-from-dist": { 1963 | "version": "1.0.1", 1964 | "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", 1965 | "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", 1966 | "dev": true 1967 | }, 1968 | "path-exists": { 1969 | "version": "4.0.0", 1970 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 1971 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 1972 | "dev": true 1973 | }, 1974 | "path-key": { 1975 | "version": "3.1.1", 1976 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", 1977 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", 1978 | "dev": true 1979 | }, 1980 | "path-scurry": { 1981 | "version": "1.11.1", 1982 | "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", 1983 | "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", 1984 | "dev": true, 1985 | "requires": { 1986 | "lru-cache": "^10.2.0", 1987 | "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" 1988 | } 1989 | }, 1990 | "picomatch": { 1991 | "version": "2.3.1", 1992 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 1993 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 1994 | "dev": true 1995 | }, 1996 | "punycode.js": { 1997 | "version": "2.3.1", 1998 | "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", 1999 | "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", 2000 | "dev": true 2001 | }, 2002 | "randombytes": { 2003 | "version": "2.1.0", 2004 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 2005 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 2006 | "dev": true, 2007 | "requires": { 2008 | "safe-buffer": "^5.1.0" 2009 | } 2010 | }, 2011 | "readdirp": { 2012 | "version": "3.6.0", 2013 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 2014 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 2015 | "dev": true, 2016 | "requires": { 2017 | "picomatch": "^2.2.1" 2018 | } 2019 | }, 2020 | "require-directory": { 2021 | "version": "2.1.1", 2022 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 2023 | "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", 2024 | "dev": true 2025 | }, 2026 | "safe-buffer": { 2027 | "version": "5.2.1", 2028 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 2029 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 2030 | "dev": true 2031 | }, 2032 | "serialize-javascript": { 2033 | "version": "6.0.2", 2034 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", 2035 | "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", 2036 | "dev": true, 2037 | "requires": { 2038 | "randombytes": "^2.1.0" 2039 | } 2040 | }, 2041 | "shebang-command": { 2042 | "version": "2.0.0", 2043 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", 2044 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", 2045 | "dev": true, 2046 | "requires": { 2047 | "shebang-regex": "^3.0.0" 2048 | } 2049 | }, 2050 | "shebang-regex": { 2051 | "version": "3.0.0", 2052 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", 2053 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", 2054 | "dev": true 2055 | }, 2056 | "signal-exit": { 2057 | "version": "4.1.0", 2058 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", 2059 | "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", 2060 | "dev": true 2061 | }, 2062 | "string-width": { 2063 | "version": "4.2.3", 2064 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 2065 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 2066 | "dev": true, 2067 | "requires": { 2068 | "emoji-regex": "^8.0.0", 2069 | "is-fullwidth-code-point": "^3.0.0", 2070 | "strip-ansi": "^6.0.1" 2071 | } 2072 | }, 2073 | "string-width-cjs": { 2074 | "version": "npm:string-width@4.2.3", 2075 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", 2076 | "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", 2077 | "dev": true, 2078 | "requires": { 2079 | "emoji-regex": "^8.0.0", 2080 | "is-fullwidth-code-point": "^3.0.0", 2081 | "strip-ansi": "^6.0.1" 2082 | } 2083 | }, 2084 | "strip-ansi": { 2085 | "version": "6.0.1", 2086 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 2087 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 2088 | "dev": true, 2089 | "requires": { 2090 | "ansi-regex": "^5.0.1" 2091 | } 2092 | }, 2093 | "strip-ansi-cjs": { 2094 | "version": "npm:strip-ansi@6.0.1", 2095 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 2096 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 2097 | "dev": true, 2098 | "requires": { 2099 | "ansi-regex": "^5.0.1" 2100 | } 2101 | }, 2102 | "strip-json-comments": { 2103 | "version": "3.1.1", 2104 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 2105 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 2106 | "dev": true 2107 | }, 2108 | "supports-color": { 2109 | "version": "8.1.1", 2110 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", 2111 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", 2112 | "dev": true, 2113 | "requires": { 2114 | "has-flag": "^4.0.0" 2115 | } 2116 | }, 2117 | "to-regex-range": { 2118 | "version": "5.0.1", 2119 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 2120 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 2121 | "dev": true, 2122 | "requires": { 2123 | "is-number": "^7.0.0" 2124 | } 2125 | }, 2126 | "uc.micro": { 2127 | "version": "2.1.0", 2128 | "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", 2129 | "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", 2130 | "dev": true 2131 | }, 2132 | "which": { 2133 | "version": "2.0.2", 2134 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 2135 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 2136 | "dev": true, 2137 | "requires": { 2138 | "isexe": "^2.0.0" 2139 | } 2140 | }, 2141 | "workerpool": { 2142 | "version": "6.5.1", 2143 | "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", 2144 | "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", 2145 | "dev": true 2146 | }, 2147 | "wrap-ansi": { 2148 | "version": "7.0.0", 2149 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 2150 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 2151 | "dev": true, 2152 | "requires": { 2153 | "ansi-styles": "^4.0.0", 2154 | "string-width": "^4.1.0", 2155 | "strip-ansi": "^6.0.0" 2156 | } 2157 | }, 2158 | "wrap-ansi-cjs": { 2159 | "version": "npm:wrap-ansi@7.0.0", 2160 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 2161 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 2162 | "dev": true, 2163 | "requires": { 2164 | "ansi-styles": "^4.0.0", 2165 | "string-width": "^4.1.0", 2166 | "strip-ansi": "^6.0.0" 2167 | } 2168 | }, 2169 | "y18n": { 2170 | "version": "5.0.8", 2171 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", 2172 | "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", 2173 | "dev": true 2174 | }, 2175 | "yargs": { 2176 | "version": "16.2.0", 2177 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", 2178 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", 2179 | "dev": true, 2180 | "requires": { 2181 | "cliui": "^7.0.2", 2182 | "escalade": "^3.1.1", 2183 | "get-caller-file": "^2.0.5", 2184 | "require-directory": "^2.1.1", 2185 | "string-width": "^4.2.0", 2186 | "y18n": "^5.0.5", 2187 | "yargs-parser": "^20.2.2" 2188 | } 2189 | }, 2190 | "yargs-parser": { 2191 | "version": "20.2.9", 2192 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", 2193 | "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", 2194 | "dev": true 2195 | }, 2196 | "yargs-unparser": { 2197 | "version": "2.0.0", 2198 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", 2199 | "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", 2200 | "dev": true, 2201 | "requires": { 2202 | "camelcase": "^6.0.0", 2203 | "decamelize": "^4.0.0", 2204 | "flat": "^5.0.2", 2205 | "is-plain-obj": "^2.1.0" 2206 | } 2207 | }, 2208 | "yocto-queue": { 2209 | "version": "0.1.0", 2210 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", 2211 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", 2212 | "dev": true 2213 | } 2214 | } 2215 | } 2216 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "license": "MIT", 3 | "version": "0.9.0", 4 | "name": "markdown-it-table-of-contents", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "mocha test --recursive" 8 | }, 9 | "engines": { 10 | "node": ">6.4.0" 11 | }, 12 | "description": "A Markdown-it plugin for adding a table of contents to markdown documents", 13 | "homepage": "https://github.com/cmaas/markdown-it-table-of-contents", 14 | "keywords": [ 15 | "markdown", 16 | "markdown-it", 17 | "toc", 18 | "table of contents", 19 | "markdown-it-plugin" 20 | ], 21 | "repository": { 22 | "type": "git", 23 | "url": "https://github.com/cmaas/markdown-it-table-of-contents.git" 24 | }, 25 | "bugs": { 26 | "url": "https://github.com/cmaas/markdown-it-table-of-contents/issues" 27 | }, 28 | "author": "Chris Maas ", 29 | "contributors": [ 30 | "Listed at ", 31 | "Original author: Martin Lissmyr " 32 | ], 33 | "devDependencies": { 34 | "markdown-it": "~14.1.0", 35 | "markdown-it-anchor": "~9.2.0", 36 | "markdown-it-attrs": "^4.3.1", 37 | "mocha": "~11.0.1" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /test/fixtures/anchors-special-chars.html: -------------------------------------------------------------------------------- 1 |

    An article

    2 |

    some text with soft break before toc

    3 | 4 |

    Sub heading <span>1</span>

    5 |

    Some nice text

    6 |

    Sub heading 2

    7 |

    Some even nicer text

    8 |

    3.2. Test / with; special characters

    9 |

    Let's test special characters

    10 | -------------------------------------------------------------------------------- /test/fixtures/anchors-special-chars.md: -------------------------------------------------------------------------------- 1 | # An article 2 | some text with soft break before toc 3 | [[toc]] 4 | 5 | ## Sub heading 1 6 | Some nice text 7 | 8 | ## Sub heading 2 9 | Some even nicer text 10 | 11 | ## 3.2. Test / with; special characters 12 | Let's test special characters -------------------------------------------------------------------------------- /test/fixtures/basic.html: -------------------------------------------------------------------------------- 1 |

    An article

    2 |

    some text with hard break before toc

    3 |

    4 |

    Sub heading <span>1</span>

    5 |

    Some nice text

    6 |

    Sub heading 2

    7 |

    Some even nicer text

    8 | -------------------------------------------------------------------------------- /test/fixtures/basic.md: -------------------------------------------------------------------------------- 1 | # An article 2 | some text with hard break before toc 3 | 4 | [[toc]] 5 | 6 | ## Sub heading 1 7 | Some nice text 8 | 9 | ## Sub heading 2 10 | Some even nicer text 11 | -------------------------------------------------------------------------------- /test/fixtures/custom-attrs-with-anchors.html: -------------------------------------------------------------------------------- 1 |

    Article

    2 |

    Using custom heading id attributes via markdown-it-attrs.

    3 | 4 |

    Welcome to the show

    5 |

    Note the anchor targets for TOC links.

    6 |

    This has no custom id

    7 |

    The headline above falls back to the slugify function as anchor target.

    8 | -------------------------------------------------------------------------------- /test/fixtures/custom-attrs.html: -------------------------------------------------------------------------------- 1 |

    Article

    2 |

    Using custom heading id attributes via markdown-it-attrs.

    3 | 4 |

    Welcome to the show

    5 |

    Note the anchor targets for TOC links.

    6 |

    This has no custom id

    7 |

    The headline above falls back to the slugify function as anchor target.

    8 | -------------------------------------------------------------------------------- /test/fixtures/custom-attrs.md: -------------------------------------------------------------------------------- 1 | # Article {#my-article} 2 | 3 | Using custom heading id attributes via markdown-it-attrs. 4 | 5 | [[toc]] 6 | 7 | ## Welcome to the show {#section-1} 8 | 9 | Note the anchor targets for TOC links. 10 | 11 | ## This has no custom id 12 | 13 | The headline above falls back to the slugify function as anchor target. 14 | -------------------------------------------------------------------------------- /test/fixtures/empty.html: -------------------------------------------------------------------------------- 1 |
      2 | -------------------------------------------------------------------------------- /test/fixtures/full-example-custom-container.html: -------------------------------------------------------------------------------- 1 |

      Article

      2 | 3 |

      A message from our sponsors

      4 |

      Ad

      5 |

      Hello world, I think you should read this article

      6 |

      Lorem ipsum

      7 |

      What's next?

      8 |

      Read this next...

      9 | 10 | -------------------------------------------------------------------------------- /test/fixtures/full-example-list-attrs.html: -------------------------------------------------------------------------------- 1 |

      Article

      2 | 3 |

      A message from our sponsors

      4 |

      Ad

      5 |

      Hello world, I think you should read this article

      6 |

      Lorem ipsum

      7 |

      What's next?

      8 |

      Read this next...

      9 | 10 | -------------------------------------------------------------------------------- /test/fixtures/full-example.html: -------------------------------------------------------------------------------- 1 |

      Article

      2 | 3 |

      A message from our sponsors

      4 |

      Ad

      5 |

      Hello world, I think you should read this article

      6 |

      Lorem ipsum

      7 |

      What's next?

      8 |

      Read this next...

      9 | 10 | -------------------------------------------------------------------------------- /test/fixtures/full-example.md: -------------------------------------------------------------------------------- 1 | # Article 2 | 3 | [[toc]] 4 | 5 | ### A message from our sponsors 6 | 7 | Ad 8 | 9 | ## Hello world, I think you should read this article {#hello} 10 | 11 | Lorem ipsum 12 | 13 | ## What's next? 14 | 15 | Read this next... 16 | 17 | #### See related articles {#related} -------------------------------------------------------------------------------- /test/fixtures/multi-level-1234.html: -------------------------------------------------------------------------------- 1 |

      Article

      2 | 3 |

      B

      4 |

      C

      5 |

      D

      6 |

      E

      7 |

      F

      8 |

      G

      9 |

      Next headline is two levels deeper

      10 |

      H

      11 | -------------------------------------------------------------------------------- /test/fixtures/multi-level-23.html: -------------------------------------------------------------------------------- 1 |

      Article

      2 | 3 |

      B

      4 |

      C

      5 |

      D

      6 |

      E

      7 |

      F

      8 |

      G

      9 |

      Next headline is two levels deeper

      10 |

      H

      11 | -------------------------------------------------------------------------------- /test/fixtures/multi-level.md: -------------------------------------------------------------------------------- 1 | # Article 2 | 3 | [[toc]] 4 | 5 | ## B 6 | 7 | ## C 8 | 9 | ### D 10 | 11 | ### E 12 | 13 | ## F 14 | 15 | ## G 16 | 17 | Next headline is two levels deeper 18 | 19 | #### H 20 | -------------------------------------------------------------------------------- /test/fixtures/omit.html: -------------------------------------------------------------------------------- 1 | 2 |

      An article

      3 |

      some text with hard break before toc

      4 | 5 |

      Sub heading 1

      6 |

      Some nice text

      7 |

      Sub heading 2

      8 |

      Some even nicer text

      9 | 10 |

      Sub heading 3

      11 |

      Ignore this heading in TOC

      12 |

      Next h1 Section

      13 |

      More text

      14 | -------------------------------------------------------------------------------- /test/fixtures/omit.md: -------------------------------------------------------------------------------- 1 | 2 | # An article 3 | some text with hard break before toc 4 | 5 | [[toc]] 6 | 7 | ## Sub heading 1 8 | Some nice text 9 | 10 | ## Sub heading 2 11 | Some even nicer text 12 | 13 | 14 | ## Sub heading 3 15 | Ignore this heading in TOC 16 | 17 | # Next h1 Section 18 | More text -------------------------------------------------------------------------------- /test/fixtures/simple-1-level.html: -------------------------------------------------------------------------------- 1 |

      An article

      2 |

      some text with soft break before toc

      3 | 4 |

      Sub heading <span>1</span>

      5 |

      Some nice text

      6 |

      Sub heading 2

      7 |

      Some even nicer text

      8 | -------------------------------------------------------------------------------- /test/fixtures/simple-default.html: -------------------------------------------------------------------------------- 1 |

      An article

      2 |

      some text with soft break before toc

      3 | 4 |

      Sub heading <span>1</span>

      5 |

      Some nice text

      6 |

      Sub heading 2

      7 |

      Some even nicer text

      8 | -------------------------------------------------------------------------------- /test/fixtures/simple-with-anchors.html: -------------------------------------------------------------------------------- 1 |

      An article

      2 |

      some text with soft break before toc

      3 | 4 |

      Sub heading <span>1</span>

      5 |

      Some nice text

      6 |

      Sub heading 2

      7 |

      Some even nicer text

      8 | -------------------------------------------------------------------------------- /test/fixtures/simple-with-duplicate-headings.html: -------------------------------------------------------------------------------- 1 |

      An article

      2 | 3 |

      Sub heading

      4 |

      Some nice text

      5 |

      Common sub heading

      6 |

      Some very nice text

      7 |

      Duplicate heading

      8 |

      Some exceptionally nice text

      9 |

      Duplicate heading

      10 |

      Some exceptionally nice text

      11 |

      Sub heading 2

      12 |

      Some even nicer text

      13 |

      Common sub heading

      14 |

      Some more nice text

      15 |

      Duplicate heading

      16 |

      Some exceptionally nice text

      17 | -------------------------------------------------------------------------------- /test/fixtures/simple-with-duplicate-headings.md: -------------------------------------------------------------------------------- 1 | # An article 2 | 3 | [[toc]] 4 | 5 | ## Sub heading 6 | Some nice text 7 | 8 | ### Common sub heading 9 | Some very nice text 10 | 11 | #### Duplicate heading 12 | Some exceptionally nice text 13 | 14 | #### Duplicate heading 15 | Some exceptionally nice text 16 | 17 | ## Sub heading 2 18 | Some even nicer text 19 | 20 | ### Common sub heading 21 | Some more nice text 22 | 23 | ## Duplicate heading 24 | Some exceptionally nice text 25 | -------------------------------------------------------------------------------- /test/fixtures/simple-with-header-footer.html: -------------------------------------------------------------------------------- 1 |

      An article

      2 |

      some text with soft break before toc

      3 | 4 |

      Sub heading <span>1</span>

      5 |

      Some nice text

      6 |

      Sub heading 2

      7 |

      Some even nicer text

      8 | -------------------------------------------------------------------------------- /test/fixtures/simple-with-heading-links.html: -------------------------------------------------------------------------------- 1 |

      An article

      2 | 3 |

      Sub heading 1

      4 |

      Some nice text

      5 |

      Sub heading 2

      6 |

      Some even nicer text

      7 | -------------------------------------------------------------------------------- /test/fixtures/simple-with-heading-links.md: -------------------------------------------------------------------------------- 1 | # An article 2 | 3 | [[toc]] 4 | 5 | ## [Sub heading 1](http://www.test.com) 6 | Some nice text 7 | 8 | ## Sub [heading](http://www.test.com) 2 9 | Some even nicer text 10 | -------------------------------------------------------------------------------- /test/fixtures/simple-with-markdown-formatting.html: -------------------------------------------------------------------------------- 1 |

      An article

      2 |

      some text with soft break before toc

      3 | 4 |

      Sub heading with bold text

      5 |

      Some nice text

      6 |

      Sub heading 2 with italics text

      7 |

      Some even nicer text

      8 | -------------------------------------------------------------------------------- /test/fixtures/simple-with-markdown-formatting.md: -------------------------------------------------------------------------------- 1 | # An article 2 | some text with soft break before toc 3 | [[toc]] 4 | 5 | ## Sub heading with **bold** text 6 | Some nice text 7 | 8 | ## Sub heading 2 with _italics_ text 9 | Some even nicer text 10 | -------------------------------------------------------------------------------- /test/fixtures/simple-with-transform-link.html: -------------------------------------------------------------------------------- 1 |

      An article

      2 |

      some text with soft break before toc

      3 | 4 |

      Sub heading <span>1</span>

      5 |

      Some nice text

      6 |

      Sub heading 2

      7 |

      Some even nicer text

      8 | -------------------------------------------------------------------------------- /test/fixtures/simple.md: -------------------------------------------------------------------------------- 1 | # An article 2 | some text with soft break before toc 3 | [[toc]] 4 | 5 | ## Sub heading 1 6 | Some nice text 7 | 8 | ## Sub heading 2 9 | Some even nicer text 10 | -------------------------------------------------------------------------------- /test/fixtures/strange-order.html: -------------------------------------------------------------------------------- 1 |

      X

      2 | 3 |

      A

      4 |

      B

      5 |

      C

      6 | -------------------------------------------------------------------------------- /test/fixtures/strange-order.md: -------------------------------------------------------------------------------- 1 | ### X 2 | 3 | [[toc]] 4 | 5 | # A 6 | 7 | ### B 8 | 9 | ## C 10 | -------------------------------------------------------------------------------- /test/modules/test.js: -------------------------------------------------------------------------------- 1 | //@ts-check 2 | 'use strict'; 3 | 4 | const assert = require('assert'); 5 | const fs = require('fs'); 6 | const MarkdownIt = require('markdown-it'); 7 | const markdownItAnchor = require('markdown-it-anchor'); 8 | const markdownItAnchorOpts = { tabIndex: false, uniqueSlugStartIndex: 2 }; 9 | const markdownItAttrs = require('markdown-it-attrs'); 10 | const markdownItTOC = require('../../index.js'); 11 | 12 | // Defaults 13 | const defaultContainerClass = 'table-of-contents'; 14 | const defaultMarker = '[[toc]]'; 15 | const defaultListType = 'ul'; 16 | 17 | // Fixtures 18 | const simpleMarkdown = fs.readFileSync('test/fixtures/simple.md', 'utf-8'); 19 | const simpleWithFormatting = fs.readFileSync('test/fixtures/simple-with-markdown-formatting.md', 'utf-8'); 20 | const simpleWithFormattingHTML = fs.readFileSync('test/fixtures/simple-with-markdown-formatting.html', 'utf-8'); 21 | const simpleDefaultHTML = fs.readFileSync('test/fixtures/simple-default.html', 'utf-8'); 22 | const simple1LevelHTML = fs.readFileSync('test/fixtures/simple-1-level.html', 'utf-8'); 23 | const simpleWithAnchorsHTML = fs.readFileSync('test/fixtures/simple-with-anchors.html', 'utf-8'); 24 | const simpleWithHeaderFooterHTML = fs.readFileSync('test/fixtures/simple-with-header-footer.html', 'utf-8'); 25 | const simpleWithTransformLink = fs.readFileSync('test/fixtures/simple-with-transform-link.html', 'utf-8'); 26 | const simpleWithHeadingLink = fs.readFileSync('test/fixtures/simple-with-heading-links.md', 'utf-8'); 27 | const simpleWithHeadingLinkHTML = fs.readFileSync('test/fixtures/simple-with-heading-links.html', 'utf-8'); 28 | const simpleWithDuplicateHeadings = fs.readFileSync('test/fixtures/simple-with-duplicate-headings.md', 'utf-8'); 29 | const simpleWithDuplicateHeadingsHTML = fs.readFileSync('test/fixtures/simple-with-duplicate-headings.html', 'utf-8'); 30 | const emptyMarkdown = defaultMarker; 31 | const emptyMarkdownHtml = fs.readFileSync('test/fixtures/empty.html', 'utf-8'); 32 | 33 | const multiLevelMarkdown = fs.readFileSync('test/fixtures/multi-level.md', 'utf-8'); 34 | const multiLevel1234HTML = fs.readFileSync('test/fixtures/multi-level-1234.html', 'utf-8'); 35 | const multiLevel23HTML = fs.readFileSync('test/fixtures/multi-level-23.html', 'utf-8'); 36 | const strangeOrderMarkdown = fs.readFileSync('test/fixtures/strange-order.md', 'utf-8'); 37 | const strangeOrderHTML = fs.readFileSync('test/fixtures/strange-order.html', 'utf-8'); 38 | 39 | const customAttrsMarkdown = fs.readFileSync('test/fixtures/custom-attrs.md', 'utf-8'); 40 | const customAttrsHTML = fs.readFileSync('test/fixtures/custom-attrs.html', 'utf-8'); 41 | const customAttrsWithAnchorsHTML = fs.readFileSync('test/fixtures/custom-attrs-with-anchors.html', 'utf-8'); 42 | 43 | const fullExampleMarkdown = fs.readFileSync('test/fixtures/full-example.md', 'utf-8'); 44 | const fullExampleHTML = fs.readFileSync('test/fixtures/full-example.html', 'utf-8'); 45 | const fullExampleCustomContainerHTML = fs.readFileSync('test/fixtures/full-example-custom-container.html', 'utf-8'); 46 | 47 | const basicMarkdown = fs.readFileSync('test/fixtures/basic.md', 'utf-8'); 48 | const basicHTML = fs.readFileSync('test/fixtures/basic.html', 'utf-8'); 49 | 50 | const anchorsSpecialCharsMarkdown = fs.readFileSync('test/fixtures/anchors-special-chars.md', 'utf-8'); 51 | const anchorsSpecialCharsHTML = fs.readFileSync('test/fixtures/anchors-special-chars.html', 'utf-8'); 52 | 53 | const omitMarkdown = fs.readFileSync('test/fixtures/omit.md', 'utf-8'); 54 | const omitHTML = fs.readFileSync('test/fixtures/omit.html', 'utf-8'); 55 | 56 | 57 | const slugify = (s) => encodeURIComponent(String(s).trim().toLowerCase().replace(/\s+/g, '-')); 58 | 59 | 60 | const endOfLine = require('os').EOL; 61 | 62 | function adjustEOL(text) { 63 | if ('\n' !== endOfLine) { 64 | text = text.replace(/([^\r])\n/g, '$1' + endOfLine); 65 | } 66 | return text; 67 | } 68 | 69 | describe('Testing Markdown rendering', function () { 70 | it('Parses correctly with default settings', function (done) { 71 | const md = new MarkdownIt(); 72 | md.use(markdownItTOC); 73 | assert.equal(adjustEOL(md.render(simpleMarkdown)), simpleDefaultHTML); 74 | done(); 75 | }); 76 | 77 | it('Parses correctly with includeLevel set', function (done) { 78 | const md = new MarkdownIt(); 79 | md.use(markdownItTOC, { 80 | 'includeLevel': [2] 81 | }); 82 | assert.equal(adjustEOL(md.render(simpleMarkdown)), simple1LevelHTML); 83 | done(); 84 | }); 85 | 86 | it('Parses correctly with containerClass set', function (done) { 87 | const md = new MarkdownIt(); 88 | const customContainerClass = 'custom-container-class'; 89 | md.use(markdownItTOC, { 90 | 'containerClass': customContainerClass 91 | }); 92 | assert.equal(adjustEOL(md.render(simpleMarkdown)), simpleDefaultHTML.replace(defaultContainerClass, customContainerClass)); 93 | done(); 94 | }); 95 | 96 | it('Parses correctly with markerPattern set', function (done) { 97 | const md = new MarkdownIt(); 98 | const customMarker = '[[custom-marker]]'; 99 | md.use(markdownItTOC, { 100 | 'markerPattern': /^\[\[custom-marker\]\]/im 101 | }); 102 | assert.equal(adjustEOL(md.render(simpleMarkdown.replace(defaultMarker, customMarker))), simpleDefaultHTML); 103 | done(); 104 | }); 105 | 106 | it('Parses correctly with listType set', function (done) { 107 | const md = new MarkdownIt(); 108 | const customListType = 'ol'; 109 | md.use(markdownItTOC, { 110 | 'listType': customListType 111 | }); 112 | assert.equal(adjustEOL(md.render(simpleMarkdown)), simpleDefaultHTML.replace(new RegExp(defaultListType, 'g'), customListType)); 113 | done(); 114 | }); 115 | 116 | it('Formats markdown by default', function (done) { 117 | const md = new MarkdownIt(); 118 | md.use(markdownItTOC); 119 | assert.equal(adjustEOL(md.render(simpleWithFormatting)), simpleWithFormattingHTML); 120 | done(); 121 | }); 122 | 123 | it('Parses correctly with custom formatting', function (done) { 124 | const md = new MarkdownIt(); 125 | const customHeading = 'Heading with custom formatting 123abc'; 126 | md.use(markdownItTOC, { 127 | format: function (str) { return customHeading; } 128 | }); 129 | assert.equal(md.render(simpleMarkdown).includes(customHeading), true); 130 | done(); 131 | }); 132 | 133 | it('Custom formatting includes markdown and link', function (done) { 134 | const md = new MarkdownIt(); 135 | md.use(markdownItTOC, { 136 | format: function (str, md, link) { 137 | assert.ok(MarkdownIt.prototype.isPrototypeOf(md)); 138 | assert.notEqual(link, null); 139 | return 'customHeading'; 140 | } 141 | }); 142 | assert.equal(md.render(simpleMarkdown).includes('customHeading'), true); 143 | done(); 144 | }); 145 | 146 | it('Slugs match markdown-it-anchor', function (done) { 147 | const md = new MarkdownIt(); 148 | md.use(markdownItAnchor, markdownItAnchorOpts); 149 | md.use(markdownItTOC); 150 | assert.equal(adjustEOL(md.render(simpleMarkdown)), simpleWithAnchorsHTML); 151 | done(); 152 | }); 153 | 154 | it('Slugs match markdown-it-anchor with special chars', function (done) { 155 | const md = new MarkdownIt(); 156 | md.use(markdownItAnchor, markdownItAnchorOpts); 157 | md.use(markdownItTOC); 158 | assert.equal(adjustEOL(md.render(anchorsSpecialCharsMarkdown)), anchorsSpecialCharsHTML); 159 | done(); 160 | }); 161 | 162 | it('Generates empty TOC', function (done) { 163 | const md = new MarkdownIt(); 164 | md.use(markdownItAnchor, markdownItAnchorOpts); 165 | md.use(markdownItTOC); 166 | assert.equal(adjustEOL(md.render(emptyMarkdown)), emptyMarkdownHtml); 167 | done(); 168 | }); 169 | 170 | it('Parses correctly with container header and footer html set', function (done) { 171 | const md = new MarkdownIt(); 172 | md.use(markdownItAnchor, markdownItAnchorOpts); 173 | md.use(markdownItTOC, 174 | { 175 | slugify, 176 | containerHeaderHtml: '
      Contents
      ', 177 | containerFooterHtml: '', 178 | }); 179 | assert.equal(adjustEOL(md.render(simpleMarkdown)), simpleWithHeaderFooterHTML); 180 | done(); 181 | }); 182 | 183 | it('Generates TOC, with custom transformed link', function (done) { 184 | const md = new MarkdownIt(); 185 | md.use(markdownItAnchor, markdownItAnchorOpts); 186 | md.use(markdownItTOC, 187 | { 188 | slugify, 189 | transformLink: (href) => { 190 | return href + '&type=test'; 191 | }, 192 | }); 193 | assert.equal(adjustEOL(md.render(simpleMarkdown)), simpleWithTransformLink); 194 | done(); 195 | }); 196 | 197 | it('Parses correctly when headers are links', function (done) { 198 | const md = new MarkdownIt(); 199 | md.use(markdownItTOC); 200 | md.use(markdownItAnchor, markdownItAnchorOpts); 201 | assert.equal(adjustEOL(md.render(simpleWithHeadingLink)), simpleWithHeadingLinkHTML); 202 | done(); 203 | }); 204 | 205 | it('Parses correctly with duplicate headers', function (done) { 206 | const md = new MarkdownIt(); 207 | md.use(markdownItTOC, { 208 | 'includeLevel': [1, 2, 3, 4] 209 | }); 210 | md.use(markdownItAnchor, markdownItAnchorOpts); 211 | assert.equal(adjustEOL(md.render(simpleWithDuplicateHeadings)), simpleWithDuplicateHeadingsHTML); 212 | done(); 213 | }); 214 | 215 | it('Parses correctly with multiple levels', function (done) { 216 | const md = new MarkdownIt(); 217 | md.use(markdownItTOC, { 218 | 'includeLevel': [1, 2, 3, 4] 219 | }); 220 | assert.equal(adjustEOL(md.render(multiLevelMarkdown)), multiLevel1234HTML); 221 | done(); 222 | }); 223 | 224 | it('Parses correctly with subset of multiple levels', function (done) { 225 | const md = new MarkdownIt(); 226 | md.use(markdownItTOC, { 227 | 'includeLevel': [2, 3] 228 | }); 229 | assert.equal(adjustEOL(md.render(multiLevelMarkdown)), multiLevel23HTML); 230 | done(); 231 | }); 232 | 233 | it('Can manage headlines in a strange order', function (done) { 234 | const md = new MarkdownIt(); 235 | md.use(markdownItTOC, { 236 | 'includeLevel': [1, 2, 3] 237 | }); 238 | assert.equal(adjustEOL(md.render(strangeOrderMarkdown)), strangeOrderHTML); 239 | done(); 240 | }); 241 | 242 | it('Parses correctly with custom heading id attrs', function (done) { 243 | const md = new MarkdownIt(); 244 | md.use(markdownItTOC, { 245 | 'includeLevel': [1, 2, 3, 4] 246 | }); 247 | md.use(markdownItAttrs); 248 | assert.equal(adjustEOL(md.render(customAttrsMarkdown)), customAttrsHTML); 249 | done(); 250 | }); 251 | 252 | it('Parses correctly when combining markdown-it-attrs and markdown-it-anchor', function (done) { 253 | const md = new MarkdownIt(); 254 | md.use(markdownItTOC, { 255 | 'includeLevel': [1, 2, 3, 4] 256 | }); 257 | md.use(markdownItAttrs); 258 | assert.equal(adjustEOL(md.render(customAttrsMarkdown)), customAttrsWithAnchorsHTML); 259 | done(); 260 | }); 261 | 262 | it('Full example', function (done) { 263 | const md = new MarkdownIt(); 264 | md.use(markdownItTOC, { 265 | 'includeLevel': [2, 3, 4] 266 | }); 267 | md.use(markdownItAttrs); 268 | md.use(markdownItAnchor, markdownItAnchorOpts); 269 | assert.equal(adjustEOL(md.render(fullExampleMarkdown)), fullExampleHTML); 270 | done(); 271 | }); 272 | 273 | it('Full example with a custom container', (done) => { 274 | const md = new MarkdownIt(); 275 | md.use(markdownItTOC, { 276 | includeLevel: [2, 3, 4], 277 | transformContainerOpen: () => { 278 | return ''; 282 | } 283 | }); 284 | md.use(markdownItAttrs); 285 | md.use(markdownItAnchor, markdownItAnchorOpts); 286 | assert.equal(adjustEOL(md.render(fullExampleMarkdown)), fullExampleCustomContainerHTML); 287 | done(); 288 | }); 289 | 290 | it('Lets you emulate the old behavior', (done) => { 291 | const md = new MarkdownIt(); 292 | md.use(markdownItTOC, { 293 | includeLevel: [2, 3, 4], 294 | transformContainerOpen: () => { 295 | return ''; 299 | } 300 | }); 301 | md.use(markdownItAttrs); 302 | md.use(markdownItAnchor, markdownItAnchorOpts); 303 | assert.equal(adjustEOL(md.render(fullExampleMarkdown)), fullExampleCustomContainerHTML); 304 | done(); 305 | }); 306 | 307 | it('lets you emulate old behavior', function (done) { 308 | const md = new MarkdownIt(); 309 | md.use(markdownItTOC, { 310 | transformContainerOpen: () => { 311 | return '

      '; 312 | }, 313 | transformContainerClose: () => { 314 | return '

      '; 315 | } 316 | }); 317 | assert.equal(adjustEOL(md.render(basicMarkdown)), basicHTML); 318 | done(); 319 | }); 320 | 321 | it('getTokensText', function (done) { 322 | const md = new MarkdownIt(); 323 | md.use(markdownItTOC, { 324 | getTokensText: tokens => tokens.filter(t => ['text', 'image'].includes(t.type)).map(t => t.content).join('') 325 | }); 326 | assert.equal( 327 | md.render('# H1 ![image](link) `code` _em_' + '\n' + '[[toc]]'), 328 | '

      H1 image code em

      \n' + 329 | '\n' 330 | ); 331 | done(); 332 | }); 333 | 334 | it('Omits headlines', function (done) { 335 | const md = new MarkdownIt({ html: true }); 336 | md.use(markdownItTOC, { omitTag: ''}); 337 | assert.equal(adjustEOL(md.render(omitMarkdown)), omitHTML); 338 | done(); 339 | }); 340 | }); 341 | --------------------------------------------------------------------------------