mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix js void warning
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user