diff options
author | crupest <crupest@outlook.com> | 2023-07-31 20:57:11 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2023-07-31 20:57:11 +0800 |
commit | 00c3736c3818053859710a2fbaec837dd9cbb586 (patch) | |
tree | 46d4b5efd2a82f9da67f8eea508e5b50c76b21ca /FrontEnd/src/pages/timeline/TimelinePostContentView.tsx | |
parent | f0f1984405db795d5a60bd03d05bec524dc12db3 (diff) | |
download | timeline-00c3736c3818053859710a2fbaec837dd9cbb586.tar.gz timeline-00c3736c3818053859710a2fbaec837dd9cbb586.tar.bz2 timeline-00c3736c3818053859710a2fbaec837dd9cbb586.zip |
...
Diffstat (limited to 'FrontEnd/src/pages/timeline/TimelinePostContentView.tsx')
-rw-r--r-- | FrontEnd/src/pages/timeline/TimelinePostContentView.tsx | 13 |
1 files changed, 8 insertions, 5 deletions
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; |