fix: words get cut off (#30, #35)

This commit is contained in:
josc146
2023-03-20 15:39:07 +08:00
parent d7c89104e3
commit 14ad5640f4
4 changed files with 16 additions and 2 deletions
@@ -2,6 +2,7 @@ import ReactMarkdown from 'react-markdown'
import rehypeRaw from 'rehype-raw'
import rehypeHighlight from 'rehype-highlight'
import remarkGfm from 'remark-gfm'
import remarkBreaks from 'remark-breaks'
import CopyButton from '../CopyButton'
import { useRef } from 'react'
import PropTypes from 'prop-types'
@@ -34,7 +35,7 @@ export function MarkdownRender(props) {
return (
<div dir="auto">
<ReactMarkdown
remarkPlugins={[remarkGfm]}
remarkPlugins={[remarkGfm, remarkBreaks]}
rehypePlugins={[
rehypeRaw,
[
+2 -1
View File
@@ -5,6 +5,7 @@ import rehypeHighlight from 'rehype-highlight'
import rehypeKatex from 'rehype-katex'
import remarkMath from 'remark-math'
import remarkGfm from 'remark-gfm'
import remarkBreaks from 'remark-breaks'
import CopyButton from '../CopyButton'
import { useRef } from 'react'
import PropTypes from 'prop-types'
@@ -37,7 +38,7 @@ export function MarkdownRender(props) {
return (
<div dir="auto">
<ReactMarkdown
remarkPlugins={[remarkMath, remarkGfm]}
remarkPlugins={[remarkMath, remarkGfm, remarkBreaks]}
rehypePlugins={[
rehypeKatex,
rehypeRaw,