mirror of
https://github.com/plankanban/planka.git
synced 2025-07-25 16:19:47 +02:00
Add support for GitHub Flavored Markdown. Closes #107
This commit is contained in:
parent
cf21bef9ee
commit
a3d1a8a09a
3 changed files with 420 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
import React, { useCallback } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import gfm from 'remark-gfm';
|
||||
|
||||
const Markdown = React.memo(({ linkStopPropagation, ...props }) => {
|
||||
const handleLinkClick = useCallback((event) => {
|
||||
|
@ -29,7 +30,7 @@ const Markdown = React.memo(({ linkStopPropagation, ...props }) => {
|
|||
}
|
||||
|
||||
// eslint-disable-next-line react/jsx-props-no-spreading
|
||||
return <ReactMarkdown {...props} renderers={renderers} />;
|
||||
return <ReactMarkdown {...props} plugins={[gfm]} renderers={renderers} />;
|
||||
});
|
||||
|
||||
Markdown.propTypes = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue