1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-18 20:59:44 +02:00

fix: Fix markdown line breaks

Closes #257
This commit is contained in:
ejo090 2022-06-06 21:37:43 +09:00 committed by GitHub
parent fee023a721
commit 685cfe7cbe
3 changed files with 28 additions and 1 deletions

View file

@ -34,6 +34,7 @@
"redux-logger": "^3.0.6",
"redux-orm": "^0.16.2",
"redux-saga": "^1.1.3",
"remark-breaks": "^3.0.2",
"remark-gfm": "^3.0.1",
"reselect": "^4.1.5",
"sails.io.js": "^1.2.1",
@ -18824,6 +18825,20 @@
"node": ">= 0.10"
}
},
"node_modules/remark-breaks": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/remark-breaks/-/remark-breaks-3.0.2.tgz",
"integrity": "sha512-x96YDJ9X+Ry0/JNZFKfr1hpcAKvGYWfUTszxY9RbxKEqq6uzPPoLCuHdZsLPZZUdAv3nCROyc7FPrQLWr2rxyw==",
"dependencies": {
"@types/mdast": "^3.0.0",
"unified": "^10.0.0",
"unist-util-visit": "^4.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/remark-gfm": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-3.0.1.tgz",
@ -36761,6 +36776,16 @@
"resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
"integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk="
},
"remark-breaks": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/remark-breaks/-/remark-breaks-3.0.2.tgz",
"integrity": "sha512-x96YDJ9X+Ry0/JNZFKfr1hpcAKvGYWfUTszxY9RbxKEqq6uzPPoLCuHdZsLPZZUdAv3nCROyc7FPrQLWr2rxyw==",
"requires": {
"@types/mdast": "^3.0.0",
"unified": "^10.0.0",
"unist-util-visit": "^4.0.0"
}
},
"remark-gfm": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-3.0.1.tgz",

View file

@ -91,6 +91,7 @@
"redux-logger": "^3.0.6",
"redux-orm": "^0.16.2",
"redux-saga": "^1.1.3",
"remark-breaks": "^3.0.2",
"remark-gfm": "^3.0.1",
"reselect": "^4.1.5",
"sails.io.js": "^1.2.1",

View file

@ -2,6 +2,7 @@ import React, { useCallback } from 'react';
import PropTypes from 'prop-types';
import ReactMarkdown from 'react-markdown';
import remarkGfm from 'remark-gfm';
import remarkBreaks from 'remark-breaks';
import './Markdown.module.scss'; // FIXME: import as styles?
@ -35,7 +36,7 @@ const Markdown = React.memo(({ linkStopPropagation, ...props }) => {
<ReactMarkdown
{...props}
components={components}
remarkPlugins={[remarkGfm]}
remarkPlugins={[remarkGfm, remarkBreaks]}
className="markdown-body"
/>
/* eslint-enable react/jsx-props-no-spreading */