Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

refactor(ui): setting marked options

robin82106a783d65
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('');