new line bug has been fixed
This commit is contained in:
parent
81faa7121e
commit
eff1a2a04f
@ -15,19 +15,22 @@ import Heading from "./typography/Heading";
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* Code */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
|
||||
import { dark } from 'react-syntax-highlighter/dist/esm/styles/prism';
|
||||
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
||||
import { dark } from "react-syntax-highlighter/dist/esm/styles/prism";
|
||||
import Link from "./typography/Link";
|
||||
import { indexOf } from "lodash";
|
||||
|
||||
export type Props = {
|
||||
markdown: string;
|
||||
};
|
||||
|
||||
const Markdown = ({ markdown }: Props) => {
|
||||
let newMarkdown = markdown.replace(/\n/g, " \n");
|
||||
|
||||
return (
|
||||
<ReactMarkdown
|
||||
remarkPlugins={[remarkGfm]}
|
||||
children={markdown}
|
||||
children={newMarkdown}
|
||||
components={{
|
||||
h1: Heading,
|
||||
h2: Typography,
|
||||
|
Loading…
x
Reference in New Issue
Block a user