From b9cfde0fb4c9d6c957de59df9a3371424d3bca06 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 22 Nov 2021 20:27:15 +0100 Subject: [PATCH] Fix webpack --- dev/lib/index.js | 9 +++++---- package.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dev/lib/index.js b/dev/lib/index.js index 0242bae..ae2d7fc 100644 --- a/dev/lib/index.js +++ b/dev/lib/index.js @@ -93,7 +93,7 @@ import {normalizeIdentifier} from 'micromark-util-normalize-identifier' import {codes} from 'micromark-util-symbol/codes.js' import {constants} from 'micromark-util-symbol/constants.js' import {types} from 'micromark-util-symbol/types.js' -import {decodeEntity} from 'parse-entities/decode-entity.js' +import {decodeNamedCharacterReference} from 'decode-named-character-reference' import {stringifyPosition} from 'unist-util-stringify-position' const own = {}.hasOwnProperty @@ -953,9 +953,10 @@ function compiler(options = {}) { ) setData('characterReferenceType') } else { - // @ts-expect-error `decodeEntity` can return false for invalid named - // character references, but everything we’ve tokenized is valid. - value = decodeEntity(data) + // @ts-expect-error `decodeNamedCharacterReference` can return false for + // invalid named character references, but everything we’ve tokenized is + // valid. + value = decodeNamedCharacterReference(data) } const tail = this.stack.pop() diff --git a/package.json b/package.json index 7af7204..ac0de8a 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "dependencies": { "@types/mdast": "^3.0.0", "@types/unist": "^2.0.0", + "decode-named-character-reference": "^1.0.0", "mdast-util-to-string": "^3.1.0", "micromark": "^3.0.0", "micromark-util-decode-numeric-character-reference": "^1.0.0", @@ -50,7 +51,6 @@ "micromark-util-normalize-identifier": "^1.0.0", "micromark-util-symbol": "^1.0.0", "micromark-util-types": "^1.0.0", - "parse-entities": "^3.0.0", "unist-util-stringify-position": "^3.0.0", "uvu": "^0.5.0" },