diff --git a/client/package.json b/client/package.json index 482d6b12..ca620cca 100644 --- a/client/package.json +++ b/client/package.json @@ -30,7 +30,7 @@ "event-source-polyfill": "1.0.31", "framer-motion": "8.5.5", "highlight.js": "11.10.0", - "marked": "4.3.0", + "marked": "14.1.2", "react": "^18.2.0", "react-dom": "^18.2.0", "react-icons": "4.12.0", @@ -43,7 +43,6 @@ "@types/debug": "4.1.12", "@types/dompurify": "2.4.0", "@types/event-source-polyfill": "1.0.5", - "@types/marked": "4.3.2", "@types/node": "^20.0.0", "@types/react": "^18.0.26", "@types/react-dom": "^18.0.9", diff --git a/client/src/features/room/molecules/formatted-message.tsx b/client/src/features/room/molecules/formatted-message.tsx index 1e835e43..1f7623fb 100644 --- a/client/src/features/room/molecules/formatted-message.tsx +++ b/client/src/features/room/molecules/formatted-message.tsx @@ -22,5 +22,5 @@ marked.setOptions({ }) const formatContent = (content: string) => { - return DOMPurify.sanitize(marked.parse(content)) + return DOMPurify.sanitize(marked.parse(content, { async: false })) } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 13d57e11..a6173a5d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,8 +60,8 @@ importers: specifier: 11.10.0 version: 11.10.0 marked: - specifier: 4.3.0 - version: 4.3.0 + specifier: 14.1.2 + version: 14.1.2 react: specifier: ^18.2.0 version: 18.3.1 @@ -93,9 +93,6 @@ importers: '@types/event-source-polyfill': specifier: 1.0.5 version: 1.0.5 - '@types/marked': - specifier: 4.3.2 - version: 4.3.2 '@types/node': specifier: ^20.0.0 version: 20.16.5 @@ -2687,9 +2684,6 @@ packages: '@types/lodash@4.17.7': resolution: {integrity: sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==} - '@types/marked@4.3.2': - resolution: {integrity: sha512-a79Yc3TOk6dGdituy8hmTTJXjOkZ7zsFYV10L337ttq/rec8lRMDBpV7fL3uLx6TgbFCa5DU/h8FmIBQPSbU0w==} - '@types/mdast@4.0.4': resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} @@ -5375,9 +5369,9 @@ packages: resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} hasBin: true - marked@4.3.0: - resolution: {integrity: sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==} - engines: {node: '>= 12'} + marked@14.1.2: + resolution: {integrity: sha512-f3r0yqpz31VXiDB/wj9GaOB0a2PRLQl6vJmXiFrniNwjkKdvakqJRULhjFKJpxOchlCRiG5fcacoUZY5Xa6PEQ==} + engines: {node: '>= 18'} hasBin: true mdast-util-to-hast@13.2.0: @@ -10930,8 +10924,6 @@ snapshots: '@types/lodash@4.17.7': {} - '@types/marked@4.3.2': {} - '@types/mdast@4.0.4': dependencies: '@types/unist': 3.0.3 @@ -14387,7 +14379,7 @@ snapshots: punycode.js: 2.3.1 uc.micro: 2.1.0 - marked@4.3.0: {} + marked@14.1.2: {} mdast-util-to-hast@13.2.0: dependencies: