Merge pull request 'new line bug has been fixed' (#143) from fix/markdown into develop

Reviewed-on: http://85.143.176.51:3000/free-land/front-end/pulls/143
This commit is contained in:
Daniel Weissmall 2022-10-12 16:12:32 +00:00
commit e97d3abe96

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,