From 82106a783d65ef8bbf9284428b0963e84d7639d3 Mon Sep 17 00:00:00 2001 From: robin Date: Tue, 13 Dec 2022 17:34:17 +0800 Subject: [PATCH] refactor(ui): setting marked options --- ui/src/components/Editor/Viewer.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/src/components/Editor/Viewer.tsx b/ui/src/components/Editor/Viewer.tsx index 68dfd8fd..c5bc69f8 100644 --- a/ui/src/components/Editor/Viewer.tsx +++ b/ui/src/components/Editor/Viewer.tsx @@ -12,6 +12,9 @@ import { marked } from 'marked'; import { htmlRender } from './utils'; let scrollTop = 0; +marked.setOptions({ + breaks: true, +}); const Index = ({ value }, ref) => { const [html, setHtml] = useState('');