From eff1a2a04f55f86f701946bf05520d442d727621 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=9CSalar?= <“salar.sali97@gmail.com”>
Date: Wed, 12 Oct 2022 19:04:52 +0300
Subject: [PATCH] new line bug has been fixed

---
 src/components/Markdown.tsx | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/components/Markdown.tsx b/src/components/Markdown.tsx
index 8adbc9b..e28c8f2 100644
--- a/src/components/Markdown.tsx
+++ b/src/components/Markdown.tsx
@@ -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,