diff --git a/package.json b/package.json index c48c503..0e34d7d 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "@types/node": "^20.0.0", "c8": "^8.0.0", "github-slugger": "^2.0.0", - "hast-util-to-html": "^8.0.0", + "hast-util-to-html": "^9.0.0", "mdast-util-to-hast": "^13.0.0", "micromark-extension-gfm": "^3.0.0", "prettier": "^3.0.0", diff --git a/test/index.js b/test/index.js index a9009f4..1ee38c1 100644 --- a/test/index.js +++ b/test/index.js @@ -43,15 +43,11 @@ test('markdown -> mdast', async function (t) { mdastExtensions: [gfmFromMarkdown()] }) - const actualHtml = toHtml( - // @ts-expect-error: remove when `to-html` is released. - toHast(mdast, {allowDangerousHtml: true}), - { - allowDangerousHtml: true, - entities: {useNamedReferences: true}, - closeSelfClosing: true - } - ) + const actualHtml = toHtml(toHast(mdast, {allowDangerousHtml: true}), { + allowDangerousHtml: true, + characterReferences: {useNamedReferences: true}, + closeSelfClosing: true + }) /** @type {string} */ let expectedMarkdown