├── .github ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md ├── funding.yml ├── settings.yml └── workflows │ └── test.yml ├── .gitignore ├── .prettierignore ├── .prettierrc.js ├── .release.json ├── LICENSE ├── README.md ├── index.d.ts ├── index.js ├── package.json ├── pnpm-lock.yaml ├── renovate.json └── test ├── fixtures ├── element.md ├── inline-blocks.md ├── multiline.md └── multiple-adjacent.md └── test.js /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Code of Conduct 2 | 3 | As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. 4 | 5 | We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion. 6 | 7 | Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct. 8 | 9 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team. 10 | 11 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. 12 | 13 | This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/) 14 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Contributions are welcome and will be fully credited! 4 | 5 | We accept contributions via Pull Requests on [Github](https://github.com/{{ githubAccount }}/{{ name }}). 6 | 7 | ## Pull Requests 8 | 9 | Here are some guidelines to make the process smoother: 10 | 11 | - **Add a test** - New features and bugfixes need tests. If you find it difficult to test, please tell us in the pull request and we will try to help you! 12 | - **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. 13 | - **Run `npm test` locally** - This will allow you to go faster 14 | - **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. 15 | - **Send coherent history** - Make sure your commits message means something 16 | - **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option. 17 | 18 | ## Creating issues 19 | 20 | ### Bug reports 21 | 22 | Always try to provide as much information as possible. If you are reporting a bug, try to provide a repro on jsfiddle.net (or anything else) or a stacktrace at the very least. This will help us check the problem quicker. 23 | 24 | ### Feature requests 25 | 26 | Lay out the reasoning behind it and propose an API for it. Ideally, you should have a practical example to prove the utility of the feature you're requesting. 27 | 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | **What kind of change does this PR introduce?** (check at least one) 10 | 11 | - [ ] Bugfix 12 | - [ ] Feature 13 | - [ ] Code style update 14 | - [ ] Refactor 15 | - [ ] Build-related changes 16 | - [ ] Other, please describe: 17 | 18 | **Does this PR introduce a breaking change?** (check one) 19 | 20 | - [ ] Yes 21 | - [ ] No 22 | 23 | If yes, please describe the impact and migration path for existing applications: 24 | 25 | **The PR fulfills these requirements:** 26 | 27 | - [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number) 28 | - [ ] All tests are passing 29 | - [ ] New/updated tests are included 30 | 31 | If adding a **new feature**, the PR's description includes: 32 | - [ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it) 33 | 34 | **Other information:** 35 | -------------------------------------------------------------------------------- /.github/funding.yml: -------------------------------------------------------------------------------- 1 | github: posva 2 | custom: https://www.paypal.me/posva 3 | -------------------------------------------------------------------------------- /.github/settings.yml: -------------------------------------------------------------------------------- 1 | labels: 2 | - name: bug 3 | color: ee0701 4 | - name: contribution welcome 5 | color: 0e8a16 6 | - name: discussion 7 | color: 4935ad 8 | - name: docs 9 | color: 8be281 10 | - name: enhancement 11 | color: a2eeef 12 | - name: good first issue 13 | color: 7057ff 14 | - name: help wanted 15 | color: 008672 16 | - name: question 17 | color: d876e3 18 | - name: wontfix 19 | color: ffffff 20 | - name: WIP 21 | color: ffffff 22 | - name: need repro 23 | color: c9581c 24 | - name: feature request 25 | color: fbca04 26 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: test 2 | 3 | on: 4 | push: 5 | paths-ignore: 6 | - 'docs/**' 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v4 14 | - uses: pnpm/action-setup@v4 15 | - uses: actions/setup-node@v4 16 | with: 17 | node-version: lts/* 18 | cache: pnpm 19 | 20 | - run: pnpm install --frozen-lockfile 21 | - run: pnpm test 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | typed-router.d.ts 2 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | export default { 2 | semi: false, 3 | printWidth: 100, 4 | trailingComma: 'all', 5 | singleQuote: true, 6 | } 7 | -------------------------------------------------------------------------------- /.release.json: -------------------------------------------------------------------------------- 1 | { 2 | "src": { 3 | "tagName": "v%s", 4 | "commitMessage": "🔖 %s" 5 | }, 6 | "github": { 7 | "release": true, 8 | "releaseName": "Release %s", 9 | "tokenRef": "GITHUB_TOKEN" 10 | }, 11 | "npm": { 12 | "publish": true 13 | }, 14 | "changelogCommand": "git log --pretty=format:'- %s (%h)' [REV_RANGE] | grep -e '[✨♿️⚡️🐛⬆️⬇️➖➕⏪👽💡📄]'" 15 | } 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Eduardo San Martin Morote 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | 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, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # markdown-it-custom-block 2 | 3 | > Handle custom blocks transformations 4 | 5 | ## Usage 6 | 7 | ```js 8 | import customBlock from 'markdown-it-custom-block' 9 | 10 | markdownit().use(customBlock, { 11 | example(arg) { 12 | return `` 13 | }, 14 | video(url) { 15 | return `` 18 | }, 19 | }) 20 | ``` 21 | 22 | ```md 23 | @[example](hello) 24 | 25 | @[video](video.mp4) 26 | ``` 27 | 28 | becomes 29 | 30 | ```html 31 | 32 | 35 | ``` 36 | 37 | ## License 38 | 39 | [MIT](http://opensource.org/licenses/MIT) 40 | -------------------------------------------------------------------------------- /index.d.ts: -------------------------------------------------------------------------------- 1 | import type { PluginWithOptions } from 'markdown-it' 2 | 3 | declare const plugin: PluginWithOptions string>> 4 | 5 | export default plugin 6 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const embedRE = /@\[([\w-]+)\]\(([\s\S]+)\)/im 2 | 3 | export default function plugin(md, options) { 4 | md.renderer.rules.custom = function tokenizeBlock(tokens, idx) { 5 | const { tag, arg } = tokens[idx].info 6 | if (!tag) return '' 7 | return options[tag](arg) + '\n' 8 | } 9 | 10 | md.block.ruler.before( 11 | 'fence', 12 | 'custom', 13 | function customEmbed(state, startLine, endLine, silent) { 14 | let startPos = state.bMarks[startLine] + state.tShift[startLine] 15 | let maxPos = state.eMarks[startLine] 16 | const block = state.src.slice(startPos, maxPos) 17 | let pointer = { line: startLine, pos: startPos } 18 | 19 | // XXX wtf 20 | if (startLine !== 0) { 21 | let prevLineStartPos = state.bMarks[startLine - 1] + state.tShift[startLine - 1] 22 | let prevLineMaxPos = state.eMarks[startLine - 1] 23 | if (prevLineMaxPos > prevLineStartPos) return false 24 | } 25 | 26 | // Check if it's @[tag](arg) 27 | if ( 28 | state.src.charCodeAt(pointer.pos) !== 0x40 /* @ */ || 29 | state.src.charCodeAt(pointer.pos + 1) !== 0x5b /* [ */ 30 | ) { 31 | return false 32 | } 33 | 34 | const match = embedRE.exec(block) 35 | 36 | if (!match || match.length < 3) { 37 | return false 38 | } 39 | 40 | const [all, tag, arg] = match 41 | 42 | pointer.pos += all.length 43 | 44 | // Block embed must be at end of input or the next line must be blank. 45 | // TODO something can be done here to make it work without blank lines 46 | if (endLine !== pointer.line + 1) { 47 | let nextLineStartPos = state.bMarks[pointer.line + 1] + state.tShift[pointer.line + 1] 48 | let nextLineMaxPos = state.eMarks[pointer.line + 1] 49 | if (nextLineMaxPos > nextLineStartPos) return false 50 | } 51 | 52 | if (pointer.line >= endLine) return false 53 | 54 | if (!silent) { 55 | let token = state.push('custom', 'div', 0) 56 | token.markup = state.src.slice(startPos, pointer.pos) 57 | token.info = { arg, tag } 58 | token.block = true 59 | token.map = [startLine, pointer.line + 1] 60 | state.line = pointer.line + 1 61 | } 62 | 63 | return true 64 | }, 65 | { alt: ['paragraph', 'reference', 'blockquote', 'list'] }, 66 | ) 67 | } 68 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "markdown-it-custom-block", 3 | "description": "Custom blocks for markdown-it", 4 | "version": "1.0.0", 5 | "packageManager": "pnpm@10.11.0", 6 | "type": "module", 7 | "main": "index.js", 8 | "types": "index.d.ts", 9 | "scripts": { 10 | "test": "mocha --colors", 11 | "dev": "npm-watch" 12 | }, 13 | "watch": { 14 | "unit": { 15 | "patterns": [ 16 | "index.js", 17 | "test/fixtures/*.md", 18 | "test" 19 | ], 20 | "extensions": "js,md,txt" 21 | } 22 | }, 23 | "keywords": [ 24 | "markdown-it-plugin", 25 | "markdown-it", 26 | "markdown" 27 | ], 28 | "engines": { 29 | "node": ">= 22.16.0" 30 | }, 31 | "repository": { 32 | "type": "git", 33 | "url": "git+https://github.com/posva/markdown-it-custom-block.git" 34 | }, 35 | "bugs": { 36 | "url": "https://github.com/posva/markdown-it-custom-block/issues" 37 | }, 38 | "homepage": "https://github.com/posva/markdown-it-custom-block#readme", 39 | "license": "MIT", 40 | "devDependencies": { 41 | "@types/markdown-it": "^14.1.2", 42 | "markdown-it": "^14.1.0", 43 | "markdown-it-testgen": "^0.1.6", 44 | "mocha": "^11.5.0", 45 | "npm-watch": "^0.13.0", 46 | "prettier": "^3.5.3" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- 1 | lockfileVersion: '9.0' 2 | 3 | settings: 4 | autoInstallPeers: true 5 | excludeLinksFromLockfile: false 6 | 7 | importers: 8 | 9 | .: 10 | devDependencies: 11 | '@types/markdown-it': 12 | specifier: ^14.1.2 13 | version: 14.1.2 14 | markdown-it: 15 | specifier: ^14.1.0 16 | version: 14.1.0 17 | markdown-it-testgen: 18 | specifier: ^0.1.6 19 | version: 0.1.6 20 | mocha: 21 | specifier: ^11.5.0 22 | version: 11.5.0 23 | npm-watch: 24 | specifier: ^0.13.0 25 | version: 0.13.0 26 | prettier: 27 | specifier: ^3.5.3 28 | version: 3.5.3 29 | 30 | packages: 31 | 32 | '@isaacs/cliui@8.0.2': 33 | resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} 34 | engines: {node: '>=12'} 35 | 36 | '@pkgjs/parseargs@0.11.0': 37 | resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} 38 | engines: {node: '>=14'} 39 | 40 | '@types/linkify-it@5.0.0': 41 | resolution: {integrity: sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==} 42 | 43 | '@types/markdown-it@14.1.2': 44 | resolution: {integrity: sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==} 45 | 46 | '@types/mdurl@2.0.0': 47 | resolution: {integrity: sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==} 48 | 49 | ansi-regex@5.0.1: 50 | resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} 51 | engines: {node: '>=8'} 52 | 53 | ansi-regex@6.1.0: 54 | resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} 55 | engines: {node: '>=12'} 56 | 57 | ansi-styles@4.3.0: 58 | resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} 59 | engines: {node: '>=8'} 60 | 61 | ansi-styles@6.2.1: 62 | resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} 63 | engines: {node: '>=12'} 64 | 65 | anymatch@3.1.3: 66 | resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} 67 | engines: {node: '>= 8'} 68 | 69 | argparse@1.0.10: 70 | resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} 71 | 72 | argparse@2.0.1: 73 | resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} 74 | 75 | assertion-error@1.0.0: 76 | resolution: {integrity: sha512-g/gZV+G476cnmtYI+Ko9d5khxSoCSoom/EaNmmCfwpOvBXEJ18qwFrxfP1/CsIqk2no1sAKKwxndV0tP7ROOFQ==} 77 | 78 | balanced-match@1.0.2: 79 | resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} 80 | 81 | binary-extensions@2.3.0: 82 | resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} 83 | engines: {node: '>=8'} 84 | 85 | brace-expansion@1.1.11: 86 | resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} 87 | 88 | brace-expansion@2.0.1: 89 | resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} 90 | 91 | braces@3.0.3: 92 | resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} 93 | engines: {node: '>=8'} 94 | 95 | browser-stdout@1.3.1: 96 | resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} 97 | 98 | camelcase@6.3.0: 99 | resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} 100 | engines: {node: '>=10'} 101 | 102 | chai@1.10.0: 103 | resolution: {integrity: sha512-E3L9M2SeQU1XagJkE9KJyTAXXHKJkJ1EsKkFp0Rl53lYa3mro2PVgYHNiCb2YRa2nUeyg7aqmI1EIcSBayNd5w==} 104 | engines: {node: '>= 0.4.0'} 105 | 106 | chalk@4.1.2: 107 | resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} 108 | engines: {node: '>=10'} 109 | 110 | chokidar@3.6.0: 111 | resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} 112 | engines: {node: '>= 8.10.0'} 113 | 114 | chokidar@4.0.3: 115 | resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} 116 | engines: {node: '>= 14.16.0'} 117 | 118 | cliui@8.0.1: 119 | resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} 120 | engines: {node: '>=12'} 121 | 122 | color-convert@2.0.1: 123 | resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} 124 | engines: {node: '>=7.0.0'} 125 | 126 | color-name@1.1.4: 127 | resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} 128 | 129 | concat-map@0.0.1: 130 | resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} 131 | 132 | cross-spawn@7.0.6: 133 | resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} 134 | engines: {node: '>= 8'} 135 | 136 | debug@4.3.7: 137 | resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} 138 | engines: {node: '>=6.0'} 139 | peerDependencies: 140 | supports-color: '*' 141 | peerDependenciesMeta: 142 | supports-color: 143 | optional: true 144 | 145 | decamelize@4.0.0: 146 | resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} 147 | engines: {node: '>=10'} 148 | 149 | deep-eql@0.1.3: 150 | resolution: {integrity: sha512-6sEotTRGBFiNcqVoeHwnfopbSpi5NbH1VWJmYCVkmxMmaVTT0bUTrNaGyBwhgP4MZL012W/mkzIn3Da+iDYweg==} 151 | 152 | diff@7.0.0: 153 | resolution: {integrity: sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==} 154 | engines: {node: '>=0.3.1'} 155 | 156 | eastasianwidth@0.2.0: 157 | resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} 158 | 159 | emoji-regex@8.0.0: 160 | resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} 161 | 162 | emoji-regex@9.2.2: 163 | resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} 164 | 165 | entities@4.5.0: 166 | resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} 167 | engines: {node: '>=0.12'} 168 | 169 | escalade@3.2.0: 170 | resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} 171 | engines: {node: '>=6'} 172 | 173 | escape-string-regexp@4.0.0: 174 | resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} 175 | engines: {node: '>=10'} 176 | 177 | esprima@4.0.1: 178 | resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} 179 | engines: {node: '>=4'} 180 | hasBin: true 181 | 182 | fill-range@7.1.1: 183 | resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} 184 | engines: {node: '>=8'} 185 | 186 | find-up@5.0.0: 187 | resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} 188 | engines: {node: '>=10'} 189 | 190 | flat@5.0.2: 191 | resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} 192 | hasBin: true 193 | 194 | foreground-child@3.3.0: 195 | resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} 196 | engines: {node: '>=14'} 197 | 198 | fsevents@2.3.3: 199 | resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} 200 | engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} 201 | os: [darwin] 202 | 203 | get-caller-file@2.0.5: 204 | resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} 205 | engines: {node: 6.* || 8.* || >= 10.*} 206 | 207 | glob-parent@5.1.2: 208 | resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} 209 | engines: {node: '>= 6'} 210 | 211 | glob@10.4.5: 212 | resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} 213 | hasBin: true 214 | 215 | has-flag@3.0.0: 216 | resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} 217 | engines: {node: '>=4'} 218 | 219 | has-flag@4.0.0: 220 | resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} 221 | engines: {node: '>=8'} 222 | 223 | he@1.2.0: 224 | resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} 225 | hasBin: true 226 | 227 | ignore-by-default@1.0.1: 228 | resolution: {integrity: sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==} 229 | 230 | inherits@2.0.4: 231 | resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} 232 | 233 | is-binary-path@2.1.0: 234 | resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} 235 | engines: {node: '>=8'} 236 | 237 | is-extglob@2.1.1: 238 | resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} 239 | engines: {node: '>=0.10.0'} 240 | 241 | is-fullwidth-code-point@3.0.0: 242 | resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} 243 | engines: {node: '>=8'} 244 | 245 | is-glob@4.0.3: 246 | resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} 247 | engines: {node: '>=0.10.0'} 248 | 249 | is-number@7.0.0: 250 | resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} 251 | engines: {node: '>=0.12.0'} 252 | 253 | is-plain-obj@2.1.0: 254 | resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} 255 | engines: {node: '>=8'} 256 | 257 | is-unicode-supported@0.1.0: 258 | resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} 259 | engines: {node: '>=10'} 260 | 261 | isexe@2.0.0: 262 | resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} 263 | 264 | jackspeak@3.4.3: 265 | resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} 266 | 267 | js-yaml@3.14.1: 268 | resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} 269 | hasBin: true 270 | 271 | js-yaml@4.1.0: 272 | resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} 273 | hasBin: true 274 | 275 | linkify-it@5.0.0: 276 | resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} 277 | 278 | locate-path@6.0.0: 279 | resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} 280 | engines: {node: '>=10'} 281 | 282 | log-symbols@4.1.0: 283 | resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} 284 | engines: {node: '>=10'} 285 | 286 | lru-cache@10.4.3: 287 | resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} 288 | 289 | markdown-it-testgen@0.1.6: 290 | resolution: {integrity: sha512-hYC71G4Mcv3Y7fLTsi4PyoHKSs0P4UgkpzmGBtUYoR/TS83lFbfXUMaI71OiMJ9r4p3fbMhHBwdNTLhSDwmt6Q==} 291 | 292 | markdown-it@14.1.0: 293 | resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} 294 | hasBin: true 295 | 296 | mdurl@2.0.0: 297 | resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} 298 | 299 | minimatch@3.1.2: 300 | resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} 301 | 302 | minimatch@9.0.5: 303 | resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} 304 | engines: {node: '>=16 || 14 >=14.17'} 305 | 306 | minipass@7.1.2: 307 | resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} 308 | engines: {node: '>=16 || 14 >=14.17'} 309 | 310 | mocha@11.5.0: 311 | resolution: {integrity: sha512-VKDjhy6LMTKm0WgNEdlY77YVsD49LZnPSXJAaPNL9NRYQADxvORsyG1DIQY6v53BKTnlNbEE2MbVCDbnxr4K3w==} 312 | engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} 313 | hasBin: true 314 | 315 | ms@2.1.3: 316 | resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} 317 | 318 | nodemon@3.1.7: 319 | resolution: {integrity: sha512-hLj7fuMow6f0lbB0cD14Lz2xNjwsyruH251Pk4t/yIitCFJbmY1myuLlHm/q06aST4jg6EgAh74PIBBrRqpVAQ==} 320 | engines: {node: '>=10'} 321 | hasBin: true 322 | 323 | normalize-path@3.0.0: 324 | resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} 325 | engines: {node: '>=0.10.0'} 326 | 327 | npm-watch@0.13.0: 328 | resolution: {integrity: sha512-MYcgocqCzYA44feZhFoYj69FfSaO0EeRE1gcRcmPaXIpNhUMAhNJ1pwic2C4Hn0OPOQmZKSl90CPgmwvOsVhTg==} 329 | hasBin: true 330 | 331 | object-assign@4.1.1: 332 | resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} 333 | engines: {node: '>=0.10.0'} 334 | 335 | p-limit@3.1.0: 336 | resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} 337 | engines: {node: '>=10'} 338 | 339 | p-locate@5.0.0: 340 | resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} 341 | engines: {node: '>=10'} 342 | 343 | package-json-from-dist@1.0.1: 344 | resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} 345 | 346 | path-exists@4.0.0: 347 | resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} 348 | engines: {node: '>=8'} 349 | 350 | path-key@3.1.1: 351 | resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} 352 | engines: {node: '>=8'} 353 | 354 | path-scurry@1.11.1: 355 | resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} 356 | engines: {node: '>=16 || 14 >=14.18'} 357 | 358 | picocolors@1.1.1: 359 | resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} 360 | 361 | picomatch@2.3.1: 362 | resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} 363 | engines: {node: '>=8.6'} 364 | 365 | prettier@3.5.3: 366 | resolution: {integrity: sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==} 367 | engines: {node: '>=14'} 368 | hasBin: true 369 | 370 | pstree.remy@1.1.8: 371 | resolution: {integrity: sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==} 372 | 373 | punycode.js@2.3.1: 374 | resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} 375 | engines: {node: '>=6'} 376 | 377 | randombytes@2.1.0: 378 | resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} 379 | 380 | readable-stream@3.6.2: 381 | resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} 382 | engines: {node: '>= 6'} 383 | 384 | readdirp@3.6.0: 385 | resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} 386 | engines: {node: '>=8.10.0'} 387 | 388 | readdirp@4.1.2: 389 | resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} 390 | engines: {node: '>= 14.18.0'} 391 | 392 | require-directory@2.1.1: 393 | resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} 394 | engines: {node: '>=0.10.0'} 395 | 396 | safe-buffer@5.2.1: 397 | resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} 398 | 399 | semver@7.6.3: 400 | resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} 401 | engines: {node: '>=10'} 402 | hasBin: true 403 | 404 | serialize-javascript@6.0.2: 405 | resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} 406 | 407 | shebang-command@2.0.0: 408 | resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} 409 | engines: {node: '>=8'} 410 | 411 | shebang-regex@3.0.0: 412 | resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} 413 | engines: {node: '>=8'} 414 | 415 | signal-exit@4.1.0: 416 | resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} 417 | engines: {node: '>=14'} 418 | 419 | simple-update-notifier@2.0.0: 420 | resolution: {integrity: sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==} 421 | engines: {node: '>=10'} 422 | 423 | sprintf-js@1.0.3: 424 | resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} 425 | 426 | string-width@4.2.3: 427 | resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} 428 | engines: {node: '>=8'} 429 | 430 | string-width@5.1.2: 431 | resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} 432 | engines: {node: '>=12'} 433 | 434 | string_decoder@1.3.0: 435 | resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} 436 | 437 | strip-ansi@6.0.1: 438 | resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} 439 | engines: {node: '>=8'} 440 | 441 | strip-ansi@7.1.0: 442 | resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} 443 | engines: {node: '>=12'} 444 | 445 | strip-json-comments@3.1.1: 446 | resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} 447 | engines: {node: '>=8'} 448 | 449 | supports-color@5.5.0: 450 | resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} 451 | engines: {node: '>=4'} 452 | 453 | supports-color@7.2.0: 454 | resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} 455 | engines: {node: '>=8'} 456 | 457 | supports-color@8.1.1: 458 | resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} 459 | engines: {node: '>=10'} 460 | 461 | through2@4.0.2: 462 | resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==} 463 | 464 | to-regex-range@5.0.1: 465 | resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} 466 | engines: {node: '>=8.0'} 467 | 468 | touch@3.1.1: 469 | resolution: {integrity: sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==} 470 | hasBin: true 471 | 472 | type-detect@0.1.1: 473 | resolution: {integrity: sha512-5rqszGVwYgBoDkIm2oUtvkfZMQ0vk29iDMU0W2qCa3rG0vPDNczCMT4hV/bLBgLg8k8ri6+u3Zbt+S/14eMzlA==} 474 | 475 | uc.micro@2.1.0: 476 | resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} 477 | 478 | undefsafe@2.0.5: 479 | resolution: {integrity: sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==} 480 | 481 | util-deprecate@1.0.2: 482 | resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} 483 | 484 | which@2.0.2: 485 | resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} 486 | engines: {node: '>= 8'} 487 | hasBin: true 488 | 489 | workerpool@6.5.1: 490 | resolution: {integrity: sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==} 491 | 492 | wrap-ansi@7.0.0: 493 | resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} 494 | engines: {node: '>=10'} 495 | 496 | wrap-ansi@8.1.0: 497 | resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} 498 | engines: {node: '>=12'} 499 | 500 | y18n@5.0.8: 501 | resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} 502 | engines: {node: '>=10'} 503 | 504 | yargs-parser@21.1.1: 505 | resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} 506 | engines: {node: '>=12'} 507 | 508 | yargs-unparser@2.0.0: 509 | resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} 510 | engines: {node: '>=10'} 511 | 512 | yargs@17.7.2: 513 | resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} 514 | engines: {node: '>=12'} 515 | 516 | yocto-queue@0.1.0: 517 | resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} 518 | engines: {node: '>=10'} 519 | 520 | snapshots: 521 | 522 | '@isaacs/cliui@8.0.2': 523 | dependencies: 524 | string-width: 5.1.2 525 | string-width-cjs: string-width@4.2.3 526 | strip-ansi: 7.1.0 527 | strip-ansi-cjs: strip-ansi@6.0.1 528 | wrap-ansi: 8.1.0 529 | wrap-ansi-cjs: wrap-ansi@7.0.0 530 | 531 | '@pkgjs/parseargs@0.11.0': 532 | optional: true 533 | 534 | '@types/linkify-it@5.0.0': {} 535 | 536 | '@types/markdown-it@14.1.2': 537 | dependencies: 538 | '@types/linkify-it': 5.0.0 539 | '@types/mdurl': 2.0.0 540 | 541 | '@types/mdurl@2.0.0': {} 542 | 543 | ansi-regex@5.0.1: {} 544 | 545 | ansi-regex@6.1.0: {} 546 | 547 | ansi-styles@4.3.0: 548 | dependencies: 549 | color-convert: 2.0.1 550 | 551 | ansi-styles@6.2.1: {} 552 | 553 | anymatch@3.1.3: 554 | dependencies: 555 | normalize-path: 3.0.0 556 | picomatch: 2.3.1 557 | 558 | argparse@1.0.10: 559 | dependencies: 560 | sprintf-js: 1.0.3 561 | 562 | argparse@2.0.1: {} 563 | 564 | assertion-error@1.0.0: {} 565 | 566 | balanced-match@1.0.2: {} 567 | 568 | binary-extensions@2.3.0: {} 569 | 570 | brace-expansion@1.1.11: 571 | dependencies: 572 | balanced-match: 1.0.2 573 | concat-map: 0.0.1 574 | 575 | brace-expansion@2.0.1: 576 | dependencies: 577 | balanced-match: 1.0.2 578 | 579 | braces@3.0.3: 580 | dependencies: 581 | fill-range: 7.1.1 582 | 583 | browser-stdout@1.3.1: {} 584 | 585 | camelcase@6.3.0: {} 586 | 587 | chai@1.10.0: 588 | dependencies: 589 | assertion-error: 1.0.0 590 | deep-eql: 0.1.3 591 | 592 | chalk@4.1.2: 593 | dependencies: 594 | ansi-styles: 4.3.0 595 | supports-color: 7.2.0 596 | 597 | chokidar@3.6.0: 598 | dependencies: 599 | anymatch: 3.1.3 600 | braces: 3.0.3 601 | glob-parent: 5.1.2 602 | is-binary-path: 2.1.0 603 | is-glob: 4.0.3 604 | normalize-path: 3.0.0 605 | readdirp: 3.6.0 606 | optionalDependencies: 607 | fsevents: 2.3.3 608 | 609 | chokidar@4.0.3: 610 | dependencies: 611 | readdirp: 4.1.2 612 | 613 | cliui@8.0.1: 614 | dependencies: 615 | string-width: 4.2.3 616 | strip-ansi: 6.0.1 617 | wrap-ansi: 7.0.0 618 | 619 | color-convert@2.0.1: 620 | dependencies: 621 | color-name: 1.1.4 622 | 623 | color-name@1.1.4: {} 624 | 625 | concat-map@0.0.1: {} 626 | 627 | cross-spawn@7.0.6: 628 | dependencies: 629 | path-key: 3.1.1 630 | shebang-command: 2.0.0 631 | which: 2.0.2 632 | 633 | debug@4.3.7(supports-color@5.5.0): 634 | dependencies: 635 | ms: 2.1.3 636 | optionalDependencies: 637 | supports-color: 5.5.0 638 | 639 | debug@4.3.7(supports-color@8.1.1): 640 | dependencies: 641 | ms: 2.1.3 642 | optionalDependencies: 643 | supports-color: 8.1.1 644 | 645 | decamelize@4.0.0: {} 646 | 647 | deep-eql@0.1.3: 648 | dependencies: 649 | type-detect: 0.1.1 650 | 651 | diff@7.0.0: {} 652 | 653 | eastasianwidth@0.2.0: {} 654 | 655 | emoji-regex@8.0.0: {} 656 | 657 | emoji-regex@9.2.2: {} 658 | 659 | entities@4.5.0: {} 660 | 661 | escalade@3.2.0: {} 662 | 663 | escape-string-regexp@4.0.0: {} 664 | 665 | esprima@4.0.1: {} 666 | 667 | fill-range@7.1.1: 668 | dependencies: 669 | to-regex-range: 5.0.1 670 | 671 | find-up@5.0.0: 672 | dependencies: 673 | locate-path: 6.0.0 674 | path-exists: 4.0.0 675 | 676 | flat@5.0.2: {} 677 | 678 | foreground-child@3.3.0: 679 | dependencies: 680 | cross-spawn: 7.0.6 681 | signal-exit: 4.1.0 682 | 683 | fsevents@2.3.3: 684 | optional: true 685 | 686 | get-caller-file@2.0.5: {} 687 | 688 | glob-parent@5.1.2: 689 | dependencies: 690 | is-glob: 4.0.3 691 | 692 | glob@10.4.5: 693 | dependencies: 694 | foreground-child: 3.3.0 695 | jackspeak: 3.4.3 696 | minimatch: 9.0.5 697 | minipass: 7.1.2 698 | package-json-from-dist: 1.0.1 699 | path-scurry: 1.11.1 700 | 701 | has-flag@3.0.0: {} 702 | 703 | has-flag@4.0.0: {} 704 | 705 | he@1.2.0: {} 706 | 707 | ignore-by-default@1.0.1: {} 708 | 709 | inherits@2.0.4: {} 710 | 711 | is-binary-path@2.1.0: 712 | dependencies: 713 | binary-extensions: 2.3.0 714 | 715 | is-extglob@2.1.1: {} 716 | 717 | is-fullwidth-code-point@3.0.0: {} 718 | 719 | is-glob@4.0.3: 720 | dependencies: 721 | is-extglob: 2.1.1 722 | 723 | is-number@7.0.0: {} 724 | 725 | is-plain-obj@2.1.0: {} 726 | 727 | is-unicode-supported@0.1.0: {} 728 | 729 | isexe@2.0.0: {} 730 | 731 | jackspeak@3.4.3: 732 | dependencies: 733 | '@isaacs/cliui': 8.0.2 734 | optionalDependencies: 735 | '@pkgjs/parseargs': 0.11.0 736 | 737 | js-yaml@3.14.1: 738 | dependencies: 739 | argparse: 1.0.10 740 | esprima: 4.0.1 741 | 742 | js-yaml@4.1.0: 743 | dependencies: 744 | argparse: 2.0.1 745 | 746 | linkify-it@5.0.0: 747 | dependencies: 748 | uc.micro: 2.1.0 749 | 750 | locate-path@6.0.0: 751 | dependencies: 752 | p-locate: 5.0.0 753 | 754 | log-symbols@4.1.0: 755 | dependencies: 756 | chalk: 4.1.2 757 | is-unicode-supported: 0.1.0 758 | 759 | lru-cache@10.4.3: {} 760 | 761 | markdown-it-testgen@0.1.6: 762 | dependencies: 763 | chai: 1.10.0 764 | js-yaml: 3.14.1 765 | object-assign: 4.1.1 766 | 767 | markdown-it@14.1.0: 768 | dependencies: 769 | argparse: 2.0.1 770 | entities: 4.5.0 771 | linkify-it: 5.0.0 772 | mdurl: 2.0.0 773 | punycode.js: 2.3.1 774 | uc.micro: 2.1.0 775 | 776 | mdurl@2.0.0: {} 777 | 778 | minimatch@3.1.2: 779 | dependencies: 780 | brace-expansion: 1.1.11 781 | 782 | minimatch@9.0.5: 783 | dependencies: 784 | brace-expansion: 2.0.1 785 | 786 | minipass@7.1.2: {} 787 | 788 | mocha@11.5.0: 789 | dependencies: 790 | browser-stdout: 1.3.1 791 | chokidar: 4.0.3 792 | debug: 4.3.7(supports-color@8.1.1) 793 | diff: 7.0.0 794 | escape-string-regexp: 4.0.0 795 | find-up: 5.0.0 796 | glob: 10.4.5 797 | he: 1.2.0 798 | js-yaml: 4.1.0 799 | log-symbols: 4.1.0 800 | minimatch: 9.0.5 801 | ms: 2.1.3 802 | picocolors: 1.1.1 803 | serialize-javascript: 6.0.2 804 | strip-json-comments: 3.1.1 805 | supports-color: 8.1.1 806 | workerpool: 6.5.1 807 | yargs: 17.7.2 808 | yargs-parser: 21.1.1 809 | yargs-unparser: 2.0.0 810 | 811 | ms@2.1.3: {} 812 | 813 | nodemon@3.1.7: 814 | dependencies: 815 | chokidar: 3.6.0 816 | debug: 4.3.7(supports-color@5.5.0) 817 | ignore-by-default: 1.0.1 818 | minimatch: 3.1.2 819 | pstree.remy: 1.1.8 820 | semver: 7.6.3 821 | simple-update-notifier: 2.0.0 822 | supports-color: 5.5.0 823 | touch: 3.1.1 824 | undefsafe: 2.0.5 825 | 826 | normalize-path@3.0.0: {} 827 | 828 | npm-watch@0.13.0: 829 | dependencies: 830 | nodemon: 3.1.7 831 | through2: 4.0.2 832 | 833 | object-assign@4.1.1: {} 834 | 835 | p-limit@3.1.0: 836 | dependencies: 837 | yocto-queue: 0.1.0 838 | 839 | p-locate@5.0.0: 840 | dependencies: 841 | p-limit: 3.1.0 842 | 843 | package-json-from-dist@1.0.1: {} 844 | 845 | path-exists@4.0.0: {} 846 | 847 | path-key@3.1.1: {} 848 | 849 | path-scurry@1.11.1: 850 | dependencies: 851 | lru-cache: 10.4.3 852 | minipass: 7.1.2 853 | 854 | picocolors@1.1.1: {} 855 | 856 | picomatch@2.3.1: {} 857 | 858 | prettier@3.5.3: {} 859 | 860 | pstree.remy@1.1.8: {} 861 | 862 | punycode.js@2.3.1: {} 863 | 864 | randombytes@2.1.0: 865 | dependencies: 866 | safe-buffer: 5.2.1 867 | 868 | readable-stream@3.6.2: 869 | dependencies: 870 | inherits: 2.0.4 871 | string_decoder: 1.3.0 872 | util-deprecate: 1.0.2 873 | 874 | readdirp@3.6.0: 875 | dependencies: 876 | picomatch: 2.3.1 877 | 878 | readdirp@4.1.2: {} 879 | 880 | require-directory@2.1.1: {} 881 | 882 | safe-buffer@5.2.1: {} 883 | 884 | semver@7.6.3: {} 885 | 886 | serialize-javascript@6.0.2: 887 | dependencies: 888 | randombytes: 2.1.0 889 | 890 | shebang-command@2.0.0: 891 | dependencies: 892 | shebang-regex: 3.0.0 893 | 894 | shebang-regex@3.0.0: {} 895 | 896 | signal-exit@4.1.0: {} 897 | 898 | simple-update-notifier@2.0.0: 899 | dependencies: 900 | semver: 7.6.3 901 | 902 | sprintf-js@1.0.3: {} 903 | 904 | string-width@4.2.3: 905 | dependencies: 906 | emoji-regex: 8.0.0 907 | is-fullwidth-code-point: 3.0.0 908 | strip-ansi: 6.0.1 909 | 910 | string-width@5.1.2: 911 | dependencies: 912 | eastasianwidth: 0.2.0 913 | emoji-regex: 9.2.2 914 | strip-ansi: 7.1.0 915 | 916 | string_decoder@1.3.0: 917 | dependencies: 918 | safe-buffer: 5.2.1 919 | 920 | strip-ansi@6.0.1: 921 | dependencies: 922 | ansi-regex: 5.0.1 923 | 924 | strip-ansi@7.1.0: 925 | dependencies: 926 | ansi-regex: 6.1.0 927 | 928 | strip-json-comments@3.1.1: {} 929 | 930 | supports-color@5.5.0: 931 | dependencies: 932 | has-flag: 3.0.0 933 | 934 | supports-color@7.2.0: 935 | dependencies: 936 | has-flag: 4.0.0 937 | 938 | supports-color@8.1.1: 939 | dependencies: 940 | has-flag: 4.0.0 941 | 942 | through2@4.0.2: 943 | dependencies: 944 | readable-stream: 3.6.2 945 | 946 | to-regex-range@5.0.1: 947 | dependencies: 948 | is-number: 7.0.0 949 | 950 | touch@3.1.1: {} 951 | 952 | type-detect@0.1.1: {} 953 | 954 | uc.micro@2.1.0: {} 955 | 956 | undefsafe@2.0.5: {} 957 | 958 | util-deprecate@1.0.2: {} 959 | 960 | which@2.0.2: 961 | dependencies: 962 | isexe: 2.0.0 963 | 964 | workerpool@6.5.1: {} 965 | 966 | wrap-ansi@7.0.0: 967 | dependencies: 968 | ansi-styles: 4.3.0 969 | string-width: 4.2.3 970 | strip-ansi: 6.0.1 971 | 972 | wrap-ansi@8.1.0: 973 | dependencies: 974 | ansi-styles: 6.2.1 975 | string-width: 5.1.2 976 | strip-ansi: 7.1.0 977 | 978 | y18n@5.0.8: {} 979 | 980 | yargs-parser@21.1.1: {} 981 | 982 | yargs-unparser@2.0.0: 983 | dependencies: 984 | camelcase: 6.3.0 985 | decamelize: 4.0.0 986 | flat: 5.0.2 987 | is-plain-obj: 2.1.0 988 | 989 | yargs@17.7.2: 990 | dependencies: 991 | cliui: 8.0.1 992 | escalade: 3.2.0 993 | get-caller-file: 2.0.5 994 | require-directory: 2.1.1 995 | string-width: 4.2.3 996 | y18n: 5.0.8 997 | yargs-parser: 21.1.1 998 | 999 | yocto-queue@0.1.0: {} 1000 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["github>posva/renovate-config"] 3 | } 4 | -------------------------------------------------------------------------------- /test/fixtures/element.md: -------------------------------------------------------------------------------- 1 | --- 2 | desc: Element 3 | --- 4 | 5 | transform into element 6 | . 7 | @[example](button) 8 | . 9 | 10 | . 11 | -------------------------------------------------------------------------------- /test/fixtures/inline-blocks.md: -------------------------------------------------------------------------------- 1 | --- 2 | desc: Element 3 | --- 4 | 5 | Two occurrences no separation 6 | . 7 | @[example](button1) 8 | @[example](button2) 9 | @[example](button3) 10 | 11 | . 12 | 13 | 14 | 15 | . 16 | -------------------------------------------------------------------------------- /test/fixtures/multiline.md: -------------------------------------------------------------------------------- 1 | --- 2 | desc: Element 3 | --- 4 | 5 | Multiline 6 | 7 | 8 | @[example]( 9 | button1 10 | ) 11 | 12 | Some content in the middle 13 | -------------------------------------------------------------------------------- /test/fixtures/multiple-adjacent.md: -------------------------------------------------------------------------------- 1 | --- 2 | desc: Element 3 | --- 4 | 5 | Multiple occurrences 6 | . 7 | @[example](button1) 8 | 9 | Some content in the middle 10 | 11 | @[example](button2) 12 | 13 | @[example](button3) 14 | . 15 | 16 |

Some content in the middle

17 | 18 | 19 | . 20 | -------------------------------------------------------------------------------- /test/test.js: -------------------------------------------------------------------------------- 1 | import markdownit from 'markdown-it' 2 | import generate from 'markdown-it-testgen' 3 | import { join } from 'node:path' 4 | import { fileURLToPath } from 'node:url' 5 | 6 | import customBlock from '../index.js' 7 | 8 | const __dirname = fileURLToPath(new URL('.', import.meta.url)) 9 | 10 | describe('Custom Blocks', function () { 11 | const md = markdownit().use(customBlock, { 12 | example(arg) { 13 | return `` 14 | }, 15 | }) 16 | 17 | generate(join(__dirname, 'fixtures/element.md'), { header: true }, md) 18 | generate(join(__dirname, 'fixtures/multiple-adjacent.md'), { header: true }, md) 19 | generate(join(__dirname, 'fixtures/multiline.md'), { header: true }, md) 20 | // generate(join(__dirname, 'fixtures/inline-blocks.md'), { header: true }, md); 21 | }) 22 | --------------------------------------------------------------------------------