Skip to content

Commit 18b7db2

Browse files
committed
fix: words get cut off (#30, #35)
1 parent 94ce308 commit 18b7db2

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"rehype-highlight": "^6.0.0",
4343
"rehype-katex": "^6.0.2",
4444
"rehype-raw": "^6.1.1",
45+
"remark-breaks": "^3.0.2",
4546
"remark-gfm": "^3.0.1",
4647
"remark-math": "^5.1.1",
4748
"uuid": "^9.0.0",

src/components/MarkdownRender/markdown-without-katex.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import ReactMarkdown from 'react-markdown'
22
import rehypeRaw from 'rehype-raw'
33
import rehypeHighlight from 'rehype-highlight'
44
import remarkGfm from 'remark-gfm'
5+
import remarkBreaks from 'remark-breaks'
56
import CopyButton from '../CopyButton'
67
import { useRef } from 'react'
78
import PropTypes from 'prop-types'
@@ -34,7 +35,7 @@ export function MarkdownRender(props) {
3435
return (
3536
<div dir="auto">
3637
<ReactMarkdown
37-
remarkPlugins={[remarkGfm]}
38+
remarkPlugins={[remarkGfm, remarkBreaks]}
3839
rehypePlugins={[
3940
rehypeRaw,
4041
[

src/components/MarkdownRender/markdown.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import rehypeHighlight from 'rehype-highlight'
55
import rehypeKatex from 'rehype-katex'
66
import remarkMath from 'remark-math'
77
import remarkGfm from 'remark-gfm'
8+
import remarkBreaks from 'remark-breaks'
89
import CopyButton from '../CopyButton'
910
import { useRef } from 'react'
1011
import PropTypes from 'prop-types'
@@ -37,7 +38,7 @@ export function MarkdownRender(props) {
3738
return (
3839
<div dir="auto">
3940
<ReactMarkdown
40-
remarkPlugins={[remarkMath, remarkGfm]}
41+
remarkPlugins={[remarkMath, remarkGfm, remarkBreaks]}
4142
rehypePlugins={[
4243
rehypeKatex,
4344
rehypeRaw,

0 commit comments

Comments
 (0)