{"_id":"mdast-util-directive","_rev":"4423740","name":"mdast-util-directive","description":"mdast extension to parse and serialize generic directives (`:cite[smith04]`)","dist-tags":{"latest":"3.1.0"},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"time":{"modified":"2026-04-08T13:48:37.000Z","created":"2020-10-22T16:45:13.312Z","3.1.0":"2025-01-22T14:54:37.720Z","3.0.0":"2023-07-11T11:12:38.568Z","2.2.4":"2023-02-07T13:27:45.002Z","2.2.3":"2023-01-30T09:22:07.438Z","2.2.2":"2022-10-24T09:32:43.823Z","2.2.1":"2022-01-31T17:17:10.263Z","2.2.0":"2021-11-22T19:47:51.804Z","2.1.2":"2021-11-19T15:19:16.251Z","2.1.1":"2021-09-19T14:52:08.931Z","2.1.0":"2021-07-28T13:20:36.375Z","2.0.0":"2021-06-22T20:52:06.680Z","1.0.1":"2020-12-09T17:25:24.173Z","1.0.0":"2020-10-22T16:45:13.312Z"},"users":{},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"repository":{"type":"git","url":"git+https://github.com/syntax-tree/mdast-util-directive.git"},"versions":{"3.1.0":{"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"bugs":{"url":"https://github.com/syntax-tree/mdast-util-directive/issues"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"dependencies":{"@types/mdast":"^4.0.0","@types/unist":"^3.0.0","ccount":"^2.0.0","devlop":"^1.0.0","mdast-util-from-markdown":"^2.0.0","mdast-util-to-markdown":"^2.0.0","parse-entities":"^4.0.0","stringify-entities":"^4.0.0","unist-util-visit-parents":"^6.0.0"},"description":"mdast extension to parse and serialize generic directives (`:cite[smith04]`)","devDependencies":{"@types/node":"^22.0.0","c8":"^10.0.0","micromark-extension-directive":"^3.0.0","prettier":"^3.0.0","remark-cli":"^12.0.0","remark-preset-wooorm":"^10.0.0","type-coverage":"^2.0.0","typescript":"^5.0.0","unist-util-remove-position":"^5.0.0","xo":"^0.60.0"},"exports":"./index.js","funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"keywords":["container","directive","extension","generic","markdown","markup","mdast-util","mdast","unist","utility","util"],"license":"MIT","name":"mdast-util-directive","prettier":{"bracketSpacing":false,"semi":false,"singleQuote":true,"tabWidth":2,"trailingComma":"none","useTabs":false},"remarkConfig":{"plugins":["remark-preset-wooorm"]},"repository":{"type":"git","url":"git+https://github.com/syntax-tree/mdast-util-directive.git"},"scripts":{"build":"tsc --build --clean && tsc --build && type-coverage","format":"remark --frail --output --quiet -- . && prettier --log-level warn --write -- . && xo --fix","test-api-dev":"node --conditions development test.js","test-api-prod":"node --conditions production test.js","test-api":"npm run test-api-dev && npm run test-api-prod","test-coverage":"c8 --100 --reporter lcov -- npm run test-api","test":"npm run build && npm run format && npm run test-coverage"},"sideEffects":false,"typeCoverage":{"atLeast":100,"strict":true},"type":"module","version":"3.1.0","xo":{"overrides":[{"files":["**/*.d.ts"],"rules":{"@typescript-eslint/array-type":["error",{"default":"generic"}],"@typescript-eslint/ban-types":["error",{"extendDefaults":true}],"@typescript-eslint/consistent-type-definitions":["error","interface"]}}],"prettier":true,"rules":{"unicorn/prefer-at":"off"}},"_id":"mdast-util-directive@3.1.0","gitHead":"1ba569c6dfdf3b0157747291cc5e6df5099ad480","types":"./index.d.ts","homepage":"https://github.com/syntax-tree/mdast-util-directive#readme","_nodeVersion":"23.1.0","_npmVersion":"11.0.0","dist":{"shasum":"f3656f4aab6ae3767d3c72cfab5e8055572ccba1","size":10824,"noattachment":false,"key":"/mdast-util-directive/-/mdast-util-directive-3.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/mdast-util-directive/download/mdast-util-directive-3.1.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mdast-util-directive_3.1.0_1737557677510_0.6777651060106458"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-01-22T14:54:37.720Z","publish_time":1737557677720,"_source_registry_name":"default","_cnpm_publish_time":1737557677720},"3.0.0":{"name":"mdast-util-directive","version":"3.0.0","description":"mdast extension to parse and serialize generic directives (`:cite[smith04]`)","license":"MIT","keywords":["unist","mdast","mdast-util","util","utility","markdown","markup","generic","directive","container","extension"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/mdast-util-directive.git"},"bugs":{"url":"https://github.com/syntax-tree/mdast-util-directive/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","exports":"./index.js","dependencies":{"@types/mdast":"^4.0.0","@types/unist":"^3.0.0","devlop":"^1.0.0","mdast-util-from-markdown":"^2.0.0","mdast-util-to-markdown":"^2.0.0","parse-entities":"^4.0.0","stringify-entities":"^4.0.0","unist-util-visit-parents":"^6.0.0"},"devDependencies":{"@types/node":"^20.0.0","c8":"^8.0.0","micromark-extension-directive":"^3.0.0","prettier":"^2.0.0","remark-cli":"^11.0.0","remark-preset-wooorm":"^9.0.0","type-coverage":"^2.0.0","typescript":"^5.0.0","unist-util-remove-position":"^5.0.0","xo":"^0.54.0"},"scripts":{"prepack":"npm run build && npm run format","build":"tsc --build --clean && tsc --build && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api-prod":"node --conditions production test.js","test-api-dev":"node --conditions development test.js","test-api":"npm run test-api-dev && npm run test-api-prod","test-coverage":"c8 --100 --reporter lcov npm run test-api","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"bracketSpacing":false,"semi":false,"singleQuote":true,"tabWidth":2,"trailingComma":"none","useTabs":false},"remarkConfig":{"plugins":["remark-preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"ignoreCatch":true,"strict":true},"xo":{"overrides":[{"files":["**/*.ts"],"rules":{"@typescript-eslint/ban-types":"off","@typescript-eslint/consistent-type-definitions":"off"}}],"prettier":true},"gitHead":"5dd6e97d7fa3089f25a9af7b4ee382cc9dacdd9b","types":"./index.d.ts","homepage":"https://github.com/syntax-tree/mdast-util-directive#readme","_id":"mdast-util-directive@3.0.0","_nodeVersion":"20.0.0","_npmVersion":"9.7.2","dist":{"shasum":"3fb1764e705bbdf0afb0d3f889e4404c3e82561f","size":9918,"noattachment":false,"key":"/mdast-util-directive/-/mdast-util-directive-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/mdast-util-directive/download/mdast-util-directive-3.0.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mdast-util-directive_3.0.0_1689073958349_0.8191545470548582"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-07-11T11:12:38.568Z","publish_time":1689073958568,"_source_registry_name":"default","_cnpm_publish_time":1689073958568},"2.2.4":{"name":"mdast-util-directive","version":"2.2.4","description":"mdast extension to parse and serialize generic directives (`:cite[smith04]`)","license":"MIT","keywords":["unist","mdast","mdast-util","util","utility","markdown","markup","generic","directive","container","extension"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/mdast-util-directive.git"},"bugs":{"url":"https://github.com/syntax-tree/mdast-util-directive/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"@types/mdast":"^3.0.0","@types/unist":"^2.0.0","mdast-util-from-markdown":"^1.3.0","mdast-util-to-markdown":"^1.5.0","parse-entities":"^4.0.0","stringify-entities":"^4.0.0","unist-util-visit-parents":"^5.1.3"},"devDependencies":{"@types/node":"^18.0.0","c8":"^7.0.0","mdast-util-from-markdown":"^1.0.0","micromark-extension-directive":"^2.0.0","prettier":"^2.0.0","remark-cli":"^11.0.0","remark-preset-wooorm":"^9.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","unist-util-remove-position":"^4.0.0","xo":"^0.53.0"},"scripts":{"prepack":"npm run build && npm run format","build":"tsc --build --clean && tsc --build && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --100 --reporter lcov npm run test-api","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"gitHead":"56405a8014a373d1451a547ad59552bedc33c060","homepage":"https://github.com/syntax-tree/mdast-util-directive#readme","_id":"mdast-util-directive@2.2.4","_nodeVersion":"19.3.0","_npmVersion":"9.2.0","dist":{"shasum":"e397ed699ec83938cb4a48dc1cec3ae69cbd7aa3","size":9508,"noattachment":false,"key":"/mdast-util-directive/-/mdast-util-directive-2.2.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/mdast-util-directive/download/mdast-util-directive-2.2.4.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mdast-util-directive_2.2.4_1675776464795_0.005434877673202276"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-02-07T13:27:45.002Z","publish_time":1675776465002,"_cnpm_publish_time":1675776465002},"2.2.3":{"name":"mdast-util-directive","version":"2.2.3","description":"mdast extension to parse and serialize generic directives (`:cite[smith04]`)","license":"MIT","keywords":["unist","mdast","mdast-util","util","utility","markdown","markup","generic","directive","container","extension"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/mdast-util-directive.git"},"bugs":{"url":"https://github.com/syntax-tree/mdast-util-directive/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"@types/mdast":"^3.0.0","@types/unist":"^2.0.0","mdast-util-from-markdown":"^1.3.0","mdast-util-to-markdown":"^1.5.0","parse-entities":"^4.0.0","stringify-entities":"^4.0.0","unist-util-visit-parents":"^5.1.3"},"devDependencies":{"@types/node":"^18.0.0","c8":"^7.0.0","mdast-util-from-markdown":"^1.0.0","micromark-extension-directive":"^2.0.0","prettier":"^2.0.0","remark-cli":"^11.0.0","remark-preset-wooorm":"^9.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","unist-util-remove-position":"^4.0.0","xo":"^0.53.0"},"scripts":{"prepack":"npm run build && npm run format","build":"tsc --build --clean && tsc --build && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --100 --reporter lcov npm run test-api","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"gitHead":"f9dffd8ad02a8adb485bf60823eaa98a2c23e9de","homepage":"https://github.com/syntax-tree/mdast-util-directive#readme","_id":"mdast-util-directive@2.2.3","_nodeVersion":"19.3.0","_npmVersion":"9.2.0","dist":{"shasum":"d307c006d4c90781ac4950300bbae448ee890fa9","size":9492,"noattachment":false,"key":"/mdast-util-directive/-/mdast-util-directive-2.2.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/mdast-util-directive/download/mdast-util-directive-2.2.3.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mdast-util-directive_2.2.3_1675070527301_0.7079693250469494"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-30T09:22:07.438Z","publish_time":1675070527438,"_cnpm_publish_time":1675070527438},"2.2.2":{"name":"mdast-util-directive","version":"2.2.2","description":"mdast extension to parse and serialize generic directives (`:cite[smith04]`)","license":"MIT","keywords":["unist","mdast","mdast-util","util","utility","markdown","markup","generic","directive","container","extension"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/mdast-util-directive.git"},"bugs":{"url":"https://github.com/syntax-tree/mdast-util-directive/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"@types/mdast":"^3.0.0","@types/unist":"^2.0.0","mdast-util-to-markdown":"^1.3.0","parse-entities":"^4.0.0","stringify-entities":"^4.0.0","unist-util-visit-parents":"^5.0.0"},"devDependencies":{"@types/tape":"^4.0.0","c8":"^7.0.0","mdast-util-from-markdown":"^1.0.0","micromark-extension-directive":"^2.0.0","prettier":"^2.0.0","remark-cli":"^11.0.0","remark-preset-wooorm":"^9.0.0","rimraf":"^3.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","unist-util-remove-position":"^4.0.0","xo":"^0.52.0"},"scripts":{"build":"rimraf \"{index,test}.d.ts\" && tsc && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node --conditions development test.js","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"gitHead":"ffcc82c549764cc0acc62f825873fb268bcdc623","homepage":"https://github.com/syntax-tree/mdast-util-directive#readme","_id":"mdast-util-directive@2.2.2","_nodeVersion":"18.2.0","_npmVersion":"8.19.1","dist":{"shasum":"6dfbc85edf3695a82c9e15e8a6f4f5e3a89629fb","size":8343,"noattachment":false,"key":"/mdast-util-directive/-/mdast-util-directive-2.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/mdast-util-directive/download/mdast-util-directive-2.2.2.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mdast-util-directive_2.2.2_1666603963683_0.9479241161881957"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-10-24T09:40:27.513Z","publish_time":1666603963823,"_cnpm_publish_time":1666603963823},"2.2.1":{"name":"mdast-util-directive","version":"2.2.1","description":"mdast extension to parse and serialize generic directives (`:cite[smith04]`)","license":"MIT","keywords":["unist","mdast","mdast-util","util","utility","markdown","markup","generic","directive","container","extension"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/mdast-util-directive.git"},"bugs":{"url":"https://github.com/syntax-tree/mdast-util-directive/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"@types/mdast":"^3.0.0","@types/unist":"^2.0.0","mdast-util-to-markdown":"^1.3.0","parse-entities":"^4.0.0","stringify-entities":"^4.0.0","unist-util-visit-parents":"^5.0.0"},"devDependencies":{"@types/tape":"^4.0.0","c8":"^7.0.0","mdast-util-from-markdown":"^1.0.0","micromark-extension-directive":"^2.0.0","prettier":"^2.0.0","remark-cli":"^10.0.0","remark-preset-wooorm":"^9.0.0","rimraf":"^3.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","unist-util-remove-position":"^4.0.0","xo":"^0.47.0"},"scripts":{"build":"rimraf \"{index,test}.d.ts\" && tsc && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node --conditions development test.js","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"gitHead":"4c494b18ac31f27f67b95b917aacc03207d9584f","homepage":"https://github.com/syntax-tree/mdast-util-directive#readme","_id":"mdast-util-directive@2.2.1","_nodeVersion":"17.4.0","_npmVersion":"8.3.1","dist":{"shasum":"823d8e67e2aad04166e31c0a43931d3462be77fe","size":7362,"noattachment":false,"key":"/mdast-util-directive/-/mdast-util-directive-2.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/mdast-util-directive/download/mdast-util-directive-2.2.1.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mdast-util-directive_2.2.1_1643649430143_0.49528329440625796"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-01-31T17:17:20.771Z","publish_time":1643649430263,"_cnpm_publish_time":1643649430263},"2.2.0":{"name":"mdast-util-directive","version":"2.2.0","description":"mdast extension to parse and serialize generic directives (`:cite[smith04]`)","license":"MIT","keywords":["unist","mdast","mdast-util","util","utility","markdown","markup","generic","directive","container","extension"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/mdast-util-directive.git"},"bugs":{"url":"https://github.com/syntax-tree/mdast-util-directive/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"@types/mdast":"^3.0.0","@types/unist":"^2.0.0","mdast-util-to-markdown":"^1.0.0","parse-entities":"^4.0.0","stringify-entities":"^4.0.0","unist-util-visit-parents":"^5.0.0"},"devDependencies":{"@types/tape":"^4.0.0","c8":"^7.0.0","mdast-util-from-markdown":"^1.0.0","micromark-extension-directive":"^2.0.0","prettier":"^2.0.0","remark-cli":"^10.0.0","remark-preset-wooorm":"^9.0.0","rimraf":"^3.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","unist-util-remove-position":"^4.0.0","xo":"^0.46.0"},"scripts":{"build":"rimraf \"{index,test}.d.ts\" && tsc && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node --conditions development test.js","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"gitHead":"8e005e18b550a672d1cc688778900be6f296a9b9","homepage":"https://github.com/syntax-tree/mdast-util-directive#readme","_id":"mdast-util-directive@2.2.0","_nodeVersion":"17.0.1","_npmVersion":"8.1.0","dist":{"shasum":"4fb396a9f958806f54c43689aebc9b8ef982b6f2","size":7300,"noattachment":false,"key":"/mdast-util-directive/-/mdast-util-directive-2.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/mdast-util-directive/download/mdast-util-directive-2.2.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mdast-util-directive_2.2.0_1637610471592_0.6043052178605286"},"_hasShrinkwrap":false,"publish_time":1637610471804,"_cnpm_publish_time":1637610471804,"_cnpmcore_publish_time":"2021-12-16T15:56:54.959Z"},"2.1.2":{"name":"mdast-util-directive","version":"2.1.2","description":"mdast extension to parse and serialize generic directives (`:cite[smith04]`)","license":"MIT","keywords":["unist","mdast","mdast-util","util","utility","markdown","markup","generic","directive","container","extension"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/mdast-util-directive.git"},"bugs":{"url":"https://github.com/syntax-tree/mdast-util-directive/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"@types/mdast":"^3.0.0","@types/unist":"^2.0.0","mdast-util-to-markdown":"^1.0.0","parse-entities":"^3.0.0","stringify-entities":"^4.0.0","unist-util-visit-parents":"^5.0.0"},"devDependencies":{"@types/tape":"^4.0.0","c8":"^7.0.0","mdast-util-from-markdown":"^1.0.0","micromark-extension-directive":"^2.0.0","prettier":"^2.0.0","remark-cli":"^10.0.0","remark-preset-wooorm":"^9.0.0","rimraf":"^3.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","unist-util-remove-position":"^4.0.0","xo":"^0.46.0"},"scripts":{"build":"rimraf \"{index,test}.d.ts\" && tsc && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node --conditions development test.js","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"gitHead":"06d5b10e54be1bf2fe53fa328df16d18eb3e9073","homepage":"https://github.com/syntax-tree/mdast-util-directive#readme","_id":"mdast-util-directive@2.1.2","_nodeVersion":"17.0.1","_npmVersion":"8.1.0","dist":{"shasum":"7fe1e305d3d4fbc7b89ce1f9d29293979386efe2","size":7301,"noattachment":false,"key":"/mdast-util-directive/-/mdast-util-directive-2.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/mdast-util-directive/download/mdast-util-directive-2.1.2.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mdast-util-directive_2.1.2_1637335156123_0.6042030411549875"},"_hasShrinkwrap":false,"publish_time":1637335156251,"_cnpm_publish_time":1637335156251,"_cnpmcore_publish_time":"2021-12-16T15:56:55.233Z"},"2.1.1":{"name":"mdast-util-directive","version":"2.1.1","description":"mdast extension to parse and serialize generic directives (`:cite[smith04]`)","license":"MIT","keywords":["unist","mdast","mdast-util","util","utility","markdown","markup","generic","directive","container","extension"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/mdast-util-directive.git"},"bugs":{"url":"https://github.com/syntax-tree/mdast-util-directive/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"@types/mdast":"^3.0.0","mdast-util-to-markdown":"^1.0.0","parse-entities":"^3.0.0","stringify-entities":"^4.0.0","unist-util-visit-parents":"^5.0.0"},"devDependencies":{"@types/tape":"^4.0.0","c8":"^7.0.0","mdast-util-from-markdown":"^1.0.0","micromark-extension-directive":"^2.0.0","prettier":"^2.0.0","remark-cli":"^10.0.0","remark-preset-wooorm":"^9.0.0","rimraf":"^3.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","unist-util-remove-position":"^4.0.0","xo":"^0.44.0"},"scripts":{"build":"rimraf \"{index,test}.d.ts\" && tsc && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node --conditions development test.js","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"gitHead":"f7174da91931f8030a4742110e39c309a8b96e2c","homepage":"https://github.com/syntax-tree/mdast-util-directive#readme","_id":"mdast-util-directive@2.1.1","_nodeVersion":"16.9.0","_npmVersion":"7.23.0","dist":{"shasum":"1c7d42f452227752f450c314071fb6ebd8665cab","size":7263,"noattachment":false,"key":"/mdast-util-directive/-/mdast-util-directive-2.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/mdast-util-directive/download/mdast-util-directive-2.1.1.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mdast-util-directive_2.1.1_1632063128762_0.3809781144938995"},"_hasShrinkwrap":false,"publish_time":1632063128931,"_cnpm_publish_time":1632063128931,"_cnpmcore_publish_time":"2021-12-16T15:56:55.425Z"},"2.1.0":{"name":"mdast-util-directive","version":"2.1.0","description":"mdast extension to parse and serialize generic directives (`:cite[smith04]`)","license":"MIT","keywords":["unist","mdast","mdast-util","util","utility","markdown","markup","generic","directive","container","extension"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/mdast-util-directive.git"},"bugs":{"url":"https://github.com/syntax-tree/mdast-util-directive/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"@types/mdast":"^3.0.0","mdast-util-to-markdown":"^1.0.0","parse-entities":"^3.0.0","stringify-entities":"^4.0.0","unist-util-visit-parents":"^4.0.0"},"devDependencies":{"@types/tape":"^4.0.0","c8":"^7.0.0","mdast-util-from-markdown":"^1.0.0","micromark-extension-directive":"^2.0.0","prettier":"^2.0.0","remark-cli":"^9.0.0","remark-preset-wooorm":"^8.0.0","rimraf":"^3.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","unist-util-remove-position":"^4.0.0","xo":"^0.42.0"},"scripts":{"build":"rimraf \"{index,test}.d.ts\" && tsc && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node --conditions development test.js","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"gitHead":"778e22e790ed85dcc9f04bcd8ac02e33a55d39e7","homepage":"https://github.com/syntax-tree/mdast-util-directive#readme","_id":"mdast-util-directive@2.1.0","_nodeVersion":"16.2.0","_npmVersion":"7.18.1","dist":{"shasum":"3c0d716290b24cf3b704936cd906a149528806c9","size":7378,"noattachment":false,"key":"/mdast-util-directive/-/mdast-util-directive-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/mdast-util-directive/download/mdast-util-directive-2.1.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mdast-util-directive_2.1.0_1627478436259_0.8636881598278559"},"_hasShrinkwrap":false,"publish_time":1627478436375,"_cnpm_publish_time":1627478436375,"_cnpmcore_publish_time":"2021-12-16T15:56:55.646Z"},"2.0.0":{"name":"mdast-util-directive","version":"2.0.0","description":"mdast extension to parse and serialize generic directives (`:cite[smith04]`)","license":"MIT","keywords":["unist","mdast","mdast-util","util","utility","markdown","markup","generic","directive","container","extension"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/mdast-util-directive.git"},"bugs":{"url":"https://github.com/syntax-tree/mdast-util-directive/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"sideEffects":false,"type":"module","main":"index.js","types":"index.d.ts","dependencies":{"@types/mdast":"^3.0.0","mdast-util-to-markdown":"^1.0.0","parse-entities":"^3.0.0","stringify-entities":"^4.0.0","unist-util-visit-parents":"^4.0.0"},"devDependencies":{"@types/tape":"^4.0.0","c8":"^7.0.0","mdast-util-from-markdown":"^1.0.0","micromark-extension-directive":"^2.0.0","prettier":"^2.0.0","remark-cli":"^9.0.0","remark-preset-wooorm":"^8.0.0","rimraf":"^3.0.0","tape":"^5.0.0","type-coverage":"^2.0.0","typescript":"^4.0.0","unist-util-remove-position":"^4.0.0","xo":"^0.39.0"},"scripts":{"build":"rimraf \"*.d.ts\" && tsc && type-coverage","format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node --conditions development test.js","test-coverage":"c8 --check-coverage --branches 100 --functions 100 --lines 100 --statements 100 --reporter lcov node --conditions development test.js","test":"npm run build && npm run format && npm run test-coverage"},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true},"remarkConfig":{"plugins":["preset-wooorm"]},"typeCoverage":{"atLeast":100,"detail":true,"strict":true,"ignoreCatch":true},"gitHead":"b4be0dad0085d8b3f36689c09d40ce7b80db9b6e","homepage":"https://github.com/syntax-tree/mdast-util-directive#readme","_id":"mdast-util-directive@2.0.0","_nodeVersion":"16.2.0","_npmVersion":"7.18.1","dist":{"shasum":"de638fd3b8f58a8f44d44af1dbce47319b36e3c5","size":7264,"noattachment":false,"key":"/mdast-util-directive/-/mdast-util-directive-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/mdast-util-directive/download/mdast-util-directive-2.0.0.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mdast-util-directive_2.0.0_1624395126535_0.89892877280603"},"_hasShrinkwrap":false,"publish_time":1624395126680,"_cnpm_publish_time":1624395126680,"_cnpmcore_publish_time":"2021-12-16T15:56:55.881Z"},"1.0.1":{"name":"mdast-util-directive","version":"1.0.1","description":"mdast extension to parse and serialize generic directives (`:cite[smith04]`)","license":"MIT","keywords":["unist","mdast","mdast-util","util","utility","markdown","markup","generic","directive","container","extension"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/mdast-util-directive.git"},"bugs":{"url":"https://github.com/syntax-tree/mdast-util-directive/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"dependencies":{"mdast-util-to-markdown":"^0.6.0","parse-entities":"^2.0.0","repeat-string":"^1.0.0","stringify-entities":"^3.1.0","unist-util-visit-parents":"^3.0.0"},"devDependencies":{"mdast-util-from-markdown":"^0.8.0","micromark-extension-directive":"^1.0.0","nyc":"^15.0.0","prettier":"^2.0.0","remark-cli":"^9.0.0","remark-preset-wooorm":"^8.0.0","tape":"^5.0.0","unist-util-remove-position":"^3.0.0","xo":"^0.36.0"},"scripts":{"format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run format && npm run test-coverage"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"rules":{"unicorn/explicit-length-check":"off","no-eq-null":"off","eqeqeq":"off"}},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"0912be6c0ec8d695b37fd32aeac42ced152f2be9","homepage":"https://github.com/syntax-tree/mdast-util-directive#readme","_id":"mdast-util-directive@1.0.1","_nodeVersion":"15.1.0","_npmVersion":"6.14.9","dist":{"shasum":"bc2aea94eee5b89f2d11bf4546d40453e0b34cc6","size":6399,"noattachment":false,"key":"/mdast-util-directive/-/mdast-util-directive-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/mdast-util-directive/download/mdast-util-directive-1.0.1.tgz"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mdast-util-directive_1.0.1_1607534724021_0.5683108560363741"},"_hasShrinkwrap":false,"publish_time":1607534724173,"_cnpm_publish_time":1607534724173,"_cnpmcore_publish_time":"2021-12-16T15:56:56.148Z"},"1.0.0":{"name":"mdast-util-directive","version":"1.0.0","description":"mdast extension to parse and serialize generic directives (`:cite[smith04]`)","license":"MIT","keywords":["unist","mdast","mdast-util","util","utility","markdown","markup","generic","directive","container","extension"],"repository":{"type":"git","url":"git+https://github.com/syntax-tree/mdast-util-directive.git"},"bugs":{"url":"https://github.com/syntax-tree/mdast-util-directive/issues"},"funding":{"type":"opencollective","url":"https://opencollective.com/unified"},"author":{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"},"contributors":[{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"https://wooorm.com"}],"dependencies":{"mdast-util-to-markdown":"^0.5.0","parse-entities":"^2.0.0","repeat-string":"^1.0.0","stringify-entities":"^3.1.0","unist-util-visit-parents":"^3.0.0"},"devDependencies":{"mdast-util-from-markdown":"^0.8.0","micromark-extension-directive":"^1.0.0","nyc":"^15.0.0","prettier":"^2.0.0","remark-cli":"^9.0.0","remark-preset-wooorm":"^8.0.0","tape":"^5.0.0","unist-util-remove-position":"^3.0.0","xo":"^0.34.0"},"scripts":{"format":"remark . -qfo && prettier . -w --loglevel warn && xo --fix","test-api":"node test","test-coverage":"nyc --reporter lcov tape test.js","test":"npm run format && npm run test-coverage"},"nyc":{"check-coverage":true,"lines":100,"functions":100,"branches":100},"prettier":{"tabWidth":2,"useTabs":false,"singleQuote":true,"bracketSpacing":false,"semi":false,"trailingComma":"none"},"xo":{"prettier":true,"esnext":false,"rules":{"unicorn/explicit-length-check":"off","no-eq-null":"off","eqeqeq":"off"}},"remarkConfig":{"plugins":["preset-wooorm"]},"gitHead":"c655d8b1d86068b5adc78f4ab8adec690ef608b5","homepage":"https://github.com/syntax-tree/mdast-util-directive#readme","_id":"mdast-util-directive@1.0.0","_nodeVersion":"14.13.1","_npmVersion":"6.14.8","dist":{"shasum":"0400958945b04c0823a73f70718d41102bdf92cc","size":6401,"noattachment":false,"key":"/mdast-util-directive/-/mdast-util-directive-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/mdast-util-directive/download/mdast-util-directive-1.0.0.tgz"},"maintainers":[{"name":"kmck","email":"keith@mcknig.ht"},{"name":"wooorm","email":"tituswormer@gmail.com"}],"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mdast-util-directive_1.0.0_1603385113168_0.8688599409969511"},"_hasShrinkwrap":false,"publish_time":1603385113312,"_cnpm_publish_time":1603385113312,"_cnpmcore_publish_time":"2021-12-16T15:56:56.344Z"}},"readme":"# mdast-util-directive\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\n[mdast][] extensions to parse and serialize [generic directives proposal][prop]\n(`:cite[smith04]`, `::youtube[Video of a cat in a box]{v=01ab2cd3efg}`, and\nsuch).\n\n## Contents\n\n* [What is this?](#what-is-this)\n* [When to use this](#when-to-use-this)\n* [Install](#install)\n* [Use](#use)\n* [API](#api)\n  * [`directiveFromMarkdown()`](#directivefrommarkdown)\n  * [`directiveToMarkdown(options?)`](#directivetomarkdownoptions)\n  * [`ContainerDirective`](#containerdirective)\n  * [`Directives`](#directives)\n  * [`LeafDirective`](#leafdirective)\n  * [`TextDirective`](#textdirective)\n  * [`ToMarkdownOptions`](#tomarkdownoptions)\n* [HTML](#html)\n* [Syntax](#syntax)\n* [Syntax tree](#syntax-tree)\n  * [Nodes](#nodes)\n  * [Mixin](#mixin)\n* [Types](#types)\n* [Compatibility](#compatibility)\n* [Related](#related)\n* [Contribute](#contribute)\n* [License](#license)\n\n## What is this?\n\nThis package contains two extensions that add support for directive syntax in\nmarkdown to [mdast][].\nThese extensions plug into\n[`mdast-util-from-markdown`][mdast-util-from-markdown] (to support parsing\ndirectives in markdown into a syntax tree) and\n[`mdast-util-to-markdown`][mdast-util-to-markdown] (to support serializing\ndirectives in syntax trees to markdown).\n\n## When to use this\n\nDirectives are one of the four ways to extend markdown: an arbitrary extension\nsyntax (see [Extending markdown][extending-markdown] in micromark’s docs for\nthe alternatives and more info).\nThis mechanism works well when you control the content: who authors it, what\ntools handle it, and where it’s displayed.\nWhen authors can read a guide on how to embed a tweet but are not expected to\nknow the ins and outs of HTML or JavaScript.\nDirectives don’t work well if you don’t know who authors content, what tools\nhandle it, and where it ends up.\nExample use cases are a docs website for a project or product, or blogging tools\nand static site generators.\n\nYou can use these extensions when you are working with\n`mdast-util-from-markdown` and `mdast-util-to-markdown` already.\n\nWhen working with `mdast-util-from-markdown`, you must combine this package\nwith [`micromark-extension-directive`][extension].\n\nWhen you don’t need a syntax tree, you can use [`micromark`][micromark]\ndirectly with `micromark-extension-directive`.\n\nAll these packages are used [`remark-directive`][remark-directive], which\nfocusses on making it easier to transform content by abstracting these\ninternals away.\n\nThis package only handles the syntax tree.\nFor example, it does not handle how markdown is turned to HTML.\nYou can use this with some more code to match your specific needs, to allow for\nanything from callouts, citations, styled blocks, forms, embeds, spoilers, etc.\n[Traverse the tree][traversal] to change directives to whatever you please.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install mdast-util-directive\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {directiveFromMarkdown, directiveToMarkdown} from 'https://esm.sh/mdast-util-directive@3'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import {directiveFromMarkdown, directiveToMarkdown} from 'https://esm.sh/mdast-util-directive@3?bundle'\n</script>\n```\n\n## Use\n\nSay our document `example.md` contains:\n\n```markdown\nA lovely language know as :abbr[HTML]{title=\"HyperText Markup Language\"}.\n```\n\n…and our module `example.js` looks as follows:\n\n```js\nimport fs from 'node:fs/promises'\nimport {fromMarkdown} from 'mdast-util-from-markdown'\nimport {toMarkdown} from 'mdast-util-to-markdown'\nimport {directive} from 'micromark-extension-directive'\nimport {directiveFromMarkdown, directiveToMarkdown} from 'mdast-util-directive'\n\nconst doc = await fs.readFile('example.md')\n\nconst tree = fromMarkdown(doc, {\n  extensions: [directive()],\n  mdastExtensions: [directiveFromMarkdown()]\n})\n\nconsole.log(tree)\n\nconst out = toMarkdown(tree, {extensions: [directiveToMarkdown()]})\n\nconsole.log(out)\n```\n\n…now running `node example.js` yields (positional info removed for brevity):\n\n```js\n{\n  type: 'root',\n  children: [\n    {\n      type: 'paragraph',\n      children: [\n        {type: 'text', value: 'A lovely language know as '},\n        {\n          type: 'textDirective',\n          name: 'abbr',\n          attributes: {title: 'HyperText Markup Language'},\n          children: [{type: 'text', value: 'HTML'}]\n        },\n        {type: 'text', value: '.'}\n      ]\n    }\n  ]\n}\n```\n\n```markdown\nA lovely language know as :abbr[HTML]{title=\"HyperText Markup Language\"}.\n```\n\n## API\n\nThis package exports the identifiers\n[`directiveFromMarkdown`][api-directive-from-markdown] and\n[`directiveToMarkdown`][api-directive-to-markdown].\nThere is no default export.\n\n### `directiveFromMarkdown()`\n\nCreate an extension for [`mdast-util-from-markdown`][mdast-util-from-markdown]\nto enable directives in markdown.\n\n###### Returns\n\nExtension for `mdast-util-from-markdown` to enable directives\n([`FromMarkdownExtension`][from-markdown-extension]).\n\n### `directiveToMarkdown(options?)`\n\nCreate an extension for [`mdast-util-to-markdown`][mdast-util-to-markdown]\nto enable directives in markdown.\n\n###### Parameters\n\n* `options`\n  ([`ToMarkdownOptions`][api-to-markdown-options], optional)\n  — configuration\n\n###### Returns\n\nExtension for `mdast-util-to-markdown` to enable directives\n([`ToMarkdownExtension`][to-markdown-extension]).\n\n### `ContainerDirective`\n\nDirective in flow content (such as in the root document, or block quotes),\nwhich contains further flow content (TypeScript type).\n\n###### Type\n\n```ts\nimport type {BlockContent, DefinitionContent, Parent} from 'mdast'\n\ninterface ContainerDirective extends Parent {\n  type: 'containerDirective'\n  name: string\n  attributes?: Record<string, string | null | undefined> | null | undefined\n  children: Array<BlockContent | DefinitionContent>\n}\n```\n\n### `Directives`\n\nThe different directive nodes (TypeScript type).\n\n###### Type\n\n```ts\ntype Directives = ContainerDirective | LeafDirective | TextDirective\n```\n\n### `LeafDirective`\n\nDirective in flow content (such as in the root document, or block quotes),\nwhich contains nothing (TypeScript type).\n\n###### Type\n\n```ts\nimport type {PhrasingContent, Parent} from 'mdast'\n\ninterface LeafDirective extends Parent {\n  type: 'leafDirective'\n  name: string\n  attributes?: Record<string, string | null | undefined> | null | undefined\n  children: Array<PhrasingContent>\n}\n```\n\n### `TextDirective`\n\nDirective in phrasing content (such as in paragraphs, headings) (TypeScript\ntype).\n\n###### Type\n\n```ts\nimport type {PhrasingContent, Parent} from 'mdast'\n\ninterface TextDirective extends Parent {\n  type: 'textDirective'\n  name: string\n  attributes?: Record<string, string | null | undefined> | null | undefined\n  children: Array<PhrasingContent>\n}\n```\n\n### `ToMarkdownOptions`\n\nConfiguration.\n\n###### Parameters\n\n* `collapseEmptyAttributes`\n  (`boolean`, default: `true`)\n  — collapse empty attributes: get `title` instead of `title=\"\"`\n* `preferShortcut`\n  (`boolean`, default: `true`)\n  — prefer `#` and `.` shortcuts for `id` and `class`\n* `preferUnquoted`\n  (`boolean`, default: `false`)\n  — leave attributes unquoted if that results in less bytes\n* `quoteSmart`\n  (`boolean`, default: `false`)\n  — use the other quote if that results in less bytes\n* `quote`\n  (`'\"'` or `\"'\"`,\n  default: the [`quote`][quote] used by `mdast-util-to-markdown` for titles)\n  — preferred quote to use around attribute values\n\n## HTML\n\nThis utility does not handle how markdown is turned to HTML.\nYou can use this with some more code to match your specific needs, to allow for\nanything from callouts, citations, styled blocks, forms, embeds, spoilers, etc.\n[Traverse the tree][traversal] to change directives to whatever you please.\n\n## Syntax\n\nSee [Syntax in `micromark-extension-directive`][syntax].\n\n## Syntax tree\n\nThe following interfaces are added to **[mdast][]** by this utility.\n\n### Nodes\n\n#### `TextDirective`\n\n```idl\ninterface TextDirective <: Parent {\n  type: 'textDirective'\n  children: [PhrasingContent]\n}\n\nTextDirective includes Directive\n```\n\n**TextDirective** (**[Parent][dfn-parent]**) is a directive.\nIt can be used where **[phrasing][dfn-phrasing-content]** content is expected.\nIts content model is also **[phrasing][dfn-phrasing-content]** content.\nIt includes the mixin **[Directive][dfn-mxn-directive]**.\n\nFor example, the following Markdown:\n\n```markdown\n:name[Label]{#x.y.z key=value}\n```\n\nYields:\n\n```js\n{\n  type: 'textDirective',\n  name: 'name',\n  attributes: {id: 'x', class: 'y z', key: 'value'},\n  children: [{type: 'text', value: 'Label'}]\n}\n```\n\n#### `LeafDirective`\n\n```idl\ninterface LeafDirective <: Parent {\n  type: 'leafDirective'\n  children: [PhrasingContent]\n}\n\nLeafDirective includes Directive\n```\n\n**LeafDirective** (**[Parent][dfn-parent]**) is a directive.\nIt can be used where **[flow][dfn-flow-content]** content is expected.\nIts content model is **[phrasing][dfn-phrasing-content]** content.\nIt includes the mixin **[Directive][dfn-mxn-directive]**.\n\nFor example, the following Markdown:\n\n```markdown\n::youtube[Label]{v=123}\n```\n\nYields:\n\n```js\n{\n  type: 'leafDirective',\n  name: 'youtube',\n  attributes: {v: '123'},\n  children: [{type: 'text', value: 'Label'}]\n}\n```\n\n#### `ContainerDirective`\n\n```idl\ninterface ContainerDirective <: Parent {\n  type: 'containerDirective'\n  children: [FlowContent]\n}\n\nContainerDirective includes Directive\n```\n\n**ContainerDirective** (**[Parent][dfn-parent]**) is a directive.\nIt can be used where **[flow][dfn-flow-content]** content is expected.\nIts content model is also **[flow][dfn-flow-content]** content.\nIt includes the mixin **[Directive][dfn-mxn-directive]**.\n\nThe phrasing in the label is, when available, added as a paragraph with a\n`directiveLabel: true` field, as the head of its content.\n\nFor example, the following Markdown:\n\n```markdown\n:::spoiler[Open at your own peril]\nHe dies.\n:::\n```\n\nYields:\n\n```js\n{\n  type: 'containerDirective',\n  name: 'spoiler',\n  attributes: {},\n  children: [\n    {\n      type: 'paragraph',\n      data: {directiveLabel: true},\n      children: [{type: 'text', value: 'Open at your own peril'}]\n    },\n    {\n      type: 'paragraph',\n      children: [{type: 'text', value: 'He dies.'}]\n    }\n  ]\n}\n```\n\n### Mixin\n\n#### `Directive`\n\n```idl\ninterface mixin Directive {\n  name: string\n  attributes: Attributes?\n}\n\ninterface Attributes {}\ntypedef string AttributeName\ntypedef string AttributeValue\n```\n\n**Directive** represents something defined by an extension.\n\nThe `name` field must be present and represents an identifier of an extension.\n\nThe `attributes` field represents information associated with the node.\nThe value of the `attributes` field implements the **Attributes** interface.\n\nIn the **Attributes** interface, every field must be an `AttributeName` and\nevery value an `AttributeValue`.\nThe fields and values can be anything: there are no semantics (such as by HTML\nor hast).\n\n> In JSON, the value `null` must be treated as if the attribute was not\n> included.\n> In JavaScript, both `null` and `undefined` must be similarly ignored.\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional types [`ContainerDirective`][api-container-directive],\n[`Directives`][api-directives], [`LeafDirective`][api-leaf-directive], and\n[`TextDirective`][api-text-directive].\n\nIt also registers the node types with `@types/mdast`.\nIf you’re working with the syntax tree, make sure to import this utility\nsomewhere in your types, as that registers the new node types in the tree.\n\n```js\n/**\n * @import {} from 'mdast-util-directive'\n * @import {Root} from 'mdast'\n */\n\nimport {visit} from 'unist-util-visit'\n\n/** @type {Root} */\nconst tree = getMdastNodeSomeHow()\n\nvisit(tree, function (node) {\n  // `node` can now be one of the nodes for directives.\n})\n```\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line, `mdast-util-directive@^3`,\ncompatible with Node.js 16.\n\nThis utility works with `mdast-util-from-markdown` version 2+ and\n`mdast-util-to-markdown` version 2+.\n\n## Related\n\n* [`remarkjs/remark-directive`][remark-directive]\n  — remark plugin to support generic directives\n* [`micromark/micromark-extension-directive`][extension]\n  — micromark extension to parse directives\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`syntax-tree/.github`][health] for\nways to get started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[build-badge]: https://github.com/syntax-tree/mdast-util-directive/workflows/main/badge.svg\n\n[build]: https://github.com/syntax-tree/mdast-util-directive/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/mdast-util-directive.svg\n\n[coverage]: https://codecov.io/github/syntax-tree/mdast-util-directive\n\n[downloads-badge]: https://img.shields.io/npm/dm/mdast-util-directive.svg\n\n[downloads]: https://www.npmjs.com/package/mdast-util-directive\n\n[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=mdast-util-directive\n\n[size]: https://bundlejs.com/?q=mdast-util-directive\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/syntax-tree/unist/discussions\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[typescript]: https://www.typescriptlang.org\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[health]: https://github.com/syntax-tree/.github\n\n[contributing]: https://github.com/syntax-tree/.github/blob/main/contributing.md\n\n[support]: https://github.com/syntax-tree/.github/blob/main/support.md\n\n[coc]: https://github.com/syntax-tree/.github/blob/main/code-of-conduct.md\n\n[mdast]: https://github.com/syntax-tree/mdast\n\n[mdast-util-from-markdown]: https://github.com/syntax-tree/mdast-util-from-markdown\n\n[mdast-util-to-markdown]: https://github.com/syntax-tree/mdast-util-to-markdown\n\n[quote]: https://github.com/syntax-tree/mdast-util-to-markdown#optionsquote\n\n[micromark]: https://github.com/micromark/micromark\n\n[extension]: https://github.com/micromark/micromark-extension-directive\n\n[syntax]: https://github.com/micromark/micromark-extension-directive#syntax\n\n[remark-directive]: https://github.com/remarkjs/remark-directive\n\n[extending-markdown]: https://github.com/micromark/micromark#extending-markdown\n\n[prop]: https://talk.commonmark.org/t/generic-directives-plugins-syntax/444\n\n[traversal]: https://unifiedjs.com/learn/recipe/tree-traversal/\n\n[dfn-parent]: https://github.com/syntax-tree/mdast#parent\n\n[dfn-flow-content]: https://github.com/syntax-tree/mdast#flowcontent\n\n[dfn-phrasing-content]: https://github.com/syntax-tree/mdast#phrasingcontent\n\n[from-markdown-extension]: https://github.com/syntax-tree/mdast-util-from-markdown#extension\n\n[to-markdown-extension]: https://github.com/syntax-tree/mdast-util-to-markdown#options\n\n[api-directive-from-markdown]: #directivefrommarkdown\n\n[api-directive-to-markdown]: #directivetomarkdownoptions\n\n[api-to-markdown-options]: #tomarkdownoptions\n\n[api-container-directive]: #containerdirective\n\n[api-directives]: #directives\n\n[api-leaf-directive]: #leafdirective\n\n[api-text-directive]: #textdirective\n\n[dfn-mxn-directive]: #directive\n","_attachments":{},"homepage":"https://github.com/syntax-tree/mdast-util-directive#readme","bugs":{"url":"https://github.com/syntax-tree/mdast-util-directive/issues"},"license":"MIT"}