mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(markdown): show single break
This commit is contained in:
@@ -55,10 +55,12 @@ const Markdown = ({ content }: MarkdownProps) => {
|
|||||||
|
|
||||||
remarkPlugins.push([blockquoteToGreentext]);
|
remarkPlugins.push([blockquoteToGreentext]);
|
||||||
|
|
||||||
|
const doubleNewlineContent = content?.replace(/\n/g, ' \n\n');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span className={styles.markdown}>
|
<span className={styles.markdown}>
|
||||||
<ReactMarkdown
|
<ReactMarkdown
|
||||||
children={content}
|
children={doubleNewlineContent}
|
||||||
remarkPlugins={remarkPlugins}
|
remarkPlugins={remarkPlugins}
|
||||||
rehypePlugins={[[rehypeSanitize, customSchema]]}
|
rehypePlugins={[[rehypeSanitize, customSchema]]}
|
||||||
components={{
|
components={{
|
||||||
|
|||||||
@@ -14839,7 +14839,7 @@ react-scripts@5.0.1:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
fsevents "^2.3.2"
|
fsevents "^2.3.2"
|
||||||
|
|
||||||
react-virtuoso@^4.7.8:
|
react-virtuoso@4.7.8:
|
||||||
version "4.7.8"
|
version "4.7.8"
|
||||||
resolved "https://registry.yarnpkg.com/react-virtuoso/-/react-virtuoso-4.7.8.tgz#d64f950b726a3fbcba647b0dc3c0d892ea80b1d4"
|
resolved "https://registry.yarnpkg.com/react-virtuoso/-/react-virtuoso-4.7.8.tgz#d64f950b726a3fbcba647b0dc3c0d892ea80b1d4"
|
||||||
integrity sha512-P0BHOsLrmfnXv1bY9Nja07nvFciRGNgM7lTRHMcVDteTDb9tLtHzajBapKGUZ5zdyUOEVWvuW6ufQxzdGN2AKw==
|
integrity sha512-P0BHOsLrmfnXv1bY9Nja07nvFciRGNgM7lTRHMcVDteTDb9tLtHzajBapKGUZ5zdyUOEVWvuW6ufQxzdGN2AKw==
|
||||||
|
|||||||
Reference in New Issue
Block a user