From 00c3736c3818053859710a2fbaec837dd9cbb586 Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Mon, 31 Jul 2023 20:57:11 +0800
Subject: ...

---
 FrontEnd/src/pages/timeline/TimelinePostContentView.tsx | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

(limited to 'FrontEnd/src/pages/timeline/TimelinePostContentView.tsx')

diff --git a/FrontEnd/src/pages/timeline/TimelinePostContentView.tsx b/FrontEnd/src/pages/timeline/TimelinePostContentView.tsx
index 41080e10..ad5465c1 100644
--- a/FrontEnd/src/pages/timeline/TimelinePostContentView.tsx
+++ b/FrontEnd/src/pages/timeline/TimelinePostContentView.tsx
@@ -40,7 +40,7 @@ const TextView: React.FC<TimelinePostContentViewProps> = (props) => {
               setError("error");
             }
           }
-        }
+        },
       );
 
     return () => {
@@ -77,7 +77,7 @@ const ImageView: React.FC<TimelinePostContentViewProps> = (props) => {
       src={getHttpTimelineClient().generatePostDataUrl(
         post.timelineOwnerV2,
         post.timelineNameV2,
-        post.id
+        post.id,
       )}
       className={classnames(className, "timeline-content-image")}
       style={style}
@@ -113,7 +113,7 @@ const MarkdownView: React.FC<TimelinePostContentViewProps> = (props) => {
               setError("error");
             }
           }
-        }
+        },
       );
 
     return () => {
@@ -123,7 +123,10 @@ const MarkdownView: React.FC<TimelinePostContentViewProps> = (props) => {
 
   const markdownHtml = React.useMemo<string | null>(() => {
     if (markdown == null) return null;
-    return marked.parse(markdown);
+    return marked.parse(markdown, {
+      mangle: false,
+      headerIds: false,
+    });
   }, [markdown]);
 
   if (error != null) {
@@ -168,7 +171,7 @@ const viewMap: Record<string, React.FC<TimelinePostContentViewProps>> = {
 };
 
 const TimelinePostContentView: React.FC<TimelinePostContentViewProps> = (
-  props
+  props,
 ) => {
   const { post, className, style } = props;
 
-- 
cgit v1.2.3

