diff --git a/client/web/package.json b/client/web/package.json index 3e193f7b..5ac7526e 100644 --- a/client/web/package.json +++ b/client/web/package.json @@ -71,6 +71,7 @@ "react-transition-group": "^4.4.5", "react-virtualized-auto-sizer": "^1.0.7", "react-virtuoso": "^4.4.0", + "rehype-raw": "^6.1.1", "remark-gfm": "^3.0.1", "socket.io-client": "^4.6.1", "source-ref-runtime": "^1.0.7", diff --git a/client/web/src/components/Markdown.tsx b/client/web/src/components/Markdown.tsx index e9040103..1a6c1eb3 100644 --- a/client/web/src/components/Markdown.tsx +++ b/client/web/src/components/Markdown.tsx @@ -43,6 +43,7 @@ export const Markdown: React.FC<{ transformImageUri={(src) => transformUrl(src)} transformLinkUri={(href) => transformUrl(href)} remarkPlugins={[remarkGfm]} + rehypePlugins={[rehypeRaw]} linkTarget="_blank" skipHtml={true} components={components} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 85674b21..bf14b3a4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -748,6 +748,9 @@ importers: react-virtuoso: specifier: ^4.4.0 version: 4.4.0(react-dom@18.2.0)(react@18.2.0) + rehype-raw: + specifier: ^6.1.1 + version: 6.1.1 remark-gfm: specifier: ^3.0.1 version: 3.0.1 @@ -12170,7 +12173,7 @@ packages: /@types/hast@2.3.4: resolution: {integrity: sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==} dependencies: - '@types/unist': 2.0.6 + '@types/unist': 3.0.0 /@types/history@4.7.11: resolution: {integrity: sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA==} @@ -12379,7 +12382,7 @@ packages: /@types/mdast@3.0.11: resolution: {integrity: sha512-Y/uImid8aAwrEA24/1tcRZwpxX3pIFTSilcNDKSPn+Y2iDywSEachzRuvgAYYLR3wpGXAsMbv5lvKLDZLeYPAw==} dependencies: - '@types/unist': 2.0.6 + '@types/unist': 3.0.0 /@types/mime@1.3.2: resolution: {integrity: sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==} @@ -12811,6 +12814,9 @@ packages: /@types/unist@2.0.6: resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} + /@types/unist@3.0.0: + resolution: {integrity: sha512-MFETx3tbTjE7Uk6vvnWINA/1iJ7LuMdO4fcq8UfF0pRbj01aGLduVvQcRyswuACJdpnHgg8E3rQLhaRdNEJS0w==} + /@types/update-notifier@6.0.1: resolution: {integrity: sha512-J6x9qtPDKgJGLdTjiswhhiL5QJoZv7eQb44t90mWb4Cf3tnuDRMvg8je9PoxDJZiGog0bfoFVcVHBq4RcItRZg==} dependencies: