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 (