From 00c3736c3818053859710a2fbaec837dd9cbb586 Mon Sep 17 00:00:00 2001 From: crupest 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 = (props) => { setError("error"); } } - } + }, ); return () => { @@ -77,7 +77,7 @@ const ImageView: React.FC = (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 = (props) => { setError("error"); } } - } + }, ); return () => { @@ -123,7 +123,10 @@ const MarkdownView: React.FC = (props) => { const markdownHtml = React.useMemo(() => { 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> = { }; const TimelinePostContentView: React.FC = ( - props + props, ) => { const { post, className, style } = props; -- cgit v1.2.3