bug fix: remove components handling of <li> by react markdown #85

Closed
Saibato wants to merge 1 commits from bugfix1 into main
Showing only changes of commit ef114eac34 - Show all commits

View File

@ -142,11 +142,6 @@ function extractHashtags(fragments: Fragment[]) {
}).flat();
}
function transformLi({ body, tags, users }: TextFragment) {
let fragments = transformText({ body, tags, users })
return <li>{fragments}</li>
}
function transformParagraph({ body, tags, users }: TextFragment) {
const fragments = transformText({ body, tags, users })
if (fragments.every(f => typeof f === 'string')) {
@ -182,7 +177,6 @@ export default function Text({ content, tags, users }: TextProps) {
return {
p: (x: any) => transformParagraph({ body: x.children, tags, users }),
a: (x: any) => transformHttpLink(x.href),
li: (x: any) => transformLi({ body: x.children, tags, users }),
};
}, [content]);
return <ReactMarkdown className="text" components={components}>{content}</ReactMarkdown>