fix js void warning

This commit is contained in:
Tom
2023-04-25 15:26:46 +02:00
parent d25c51af61
commit abb2b453e1
3 changed files with 720 additions and 535 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
import React from 'react';
import ReactMarkdown from 'react-markdown';
import { Link } from 'react-router-dom';
import DOMPurify from 'dompurify';
import rehypeSanitize from 'rehype-sanitize';
import breaks from 'remark-breaks';
@@ -54,12 +54,12 @@ const createQuotelink = (handlequoteclick, comment, children) => {
const Post = ({ content, handlequoteclick, comment }) => {
const doubleNewlineContent = content?.replaceAll(/\n(?!\n)/g, '\n\n');
const sanitizedContent = DOMPurify.sanitize(doubleNewlineContent);
return (
<ReactMarkdown
children={sanitizedContent}
children={doubleNewlineContent}
remarkPlugins={[blockquoteToGreentext, breaks]}
rehypePlugins={[rehypeSanitize]}
components={{
img: () => null,
video: () => null,