From e2f24f38be54aebaa3cec0cea7dcba182a5686f3 Mon Sep 17 00:00:00 2001 From: Aloxaf Yin Date: Tue, 12 Nov 2024 14:28:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E5=A4=9A=E8=AF=AD=E6=B3=95?= =?UTF-8?q?=E9=AB=98=E4=BA=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aloxaf Yin --- app/components/markdown.tsx | 1 + package.json | 1 + 2 files changed, 2 insertions(+) diff --git a/app/components/markdown.tsx b/app/components/markdown.tsx index 8ea731123..d2913dc9c 100644 --- a/app/components/markdown.tsx +++ b/app/components/markdown.tsx @@ -7,6 +7,7 @@ import RemarkGfm from "remark-gfm"; import RehypeHighlight from "rehype-highlight"; import { useRef, useState, RefObject, useEffect, useMemo } from "react"; import { copyToClipboard, useWindowSize } from "../utils"; +import "lowlight/lib/all"; import mermaid from "mermaid"; import Locale from "../locales"; import LoadingIcon from "../icons/three-dots.svg"; diff --git a/package.json b/package.json index f7b544bb2..c4f846b3d 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "html-to-image": "^1.11.11", "idb-keyval": "^6.2.1", "lodash-es": "^4.17.21", + "lowlight": "^2.0.0", "markdown-to-txt": "^2.0.1", "mermaid": "^10.6.1", "nanoid": "^5.0.3",