new line bug has been fixed

This commit is contained in:
“Salar 2022-10-12 19:04:52 +03:00
parent 81faa7121e
commit eff1a2a04f

View File

@ -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,