diff --git a/index.js b/index.js
index 1f0bce8..523c5d5 100644
--- a/index.js
+++ b/index.js
@@ -1,11 +1,14 @@
+///
+///
+
/**
* @typedef {import('mdast').Root} Root
* @typedef {import('mdast-util-directive')} DoNotTouchAsThisImportIncludesDirectivesInTree
* @typedef {import('unified').Processor} Processor
*/
-import {directive} from 'micromark-extension-directive'
import {directiveFromMarkdown, directiveToMarkdown} from 'mdast-util-directive'
+import {directive} from 'micromark-extension-directive'
/**
* Add support for generic directives.
@@ -23,20 +26,14 @@ export default function remarkDirective() {
const self = /** @type {Processor} */ (this)
const data = self.data()
- /** @type {Array} */
- // @ts-expect-error: to do: remove.
const micromarkExtensions =
data.micromarkExtensions || (data.micromarkExtensions = [])
- /** @type {Array} */
- // @ts-expect-error: to do: remove.
const fromMarkdownExtensions =
data.fromMarkdownExtensions || (data.fromMarkdownExtensions = [])
- /** @type {Array} */
- // @ts-expect-error: to do: remove.
const toMarkdownExtensions =
data.toMarkdownExtensions || (data.toMarkdownExtensions = [])
micromarkExtensions.push(directive())
- fromMarkdownExtensions.push(directiveFromMarkdown)
- toMarkdownExtensions.push(directiveToMarkdown)
+ fromMarkdownExtensions.push(directiveFromMarkdown())
+ toMarkdownExtensions.push(directiveToMarkdown())
}
diff --git a/package.json b/package.json
index 28d9f49..e190754 100644
--- a/package.json
+++ b/package.json
@@ -33,20 +33,20 @@
"index.js"
],
"dependencies": {
- "@types/mdast": "^3.0.0",
- "mdast-util-directive": "^2.0.0",
- "micromark-extension-directive": "^2.0.0",
- "unified": "^10.0.0"
+ "@types/mdast": "^4.0.0",
+ "mdast-util-directive": "^3.0.0",
+ "micromark-extension-directive": "^3.0.0",
+ "unified": "^11.0.0"
},
"devDependencies": {
"@types/node": "^20.0.0",
"c8": "^8.0.0",
"is-hidden": "^2.0.0",
"prettier": "^3.0.0",
- "remark": "^14.0.0",
+ "remark": "^15.0.0",
"remark-cli": "^11.0.0",
"remark-preset-wooorm": "^9.0.0",
- "to-vfile": "^7.0.0",
+ "to-vfile": "^8.0.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"xo": "^0.56.0"
diff --git a/test/fixtures/container/output.md b/test/fixtures/container/output.md
index 78291a5..236e8a5 100644
--- a/test/fixtures/container/output.md
+++ b/test/fixtures/container/output.md
@@ -30,7 +30,7 @@ b
d
:::e
-* * f
+* * f
:::
> g h