Fix markdown parsing & remove rehypeRaw (#130)

Fixes #121
This commit is contained in:
Will Chen
2025-05-12 13:52:54 -07:00
committed by GitHub
parent c71638a508
commit 79a2b5a906
3 changed files with 1 additions and 160 deletions

View File

@@ -1,6 +1,6 @@
import React, { useMemo } from "react";
import ReactMarkdown from "react-markdown";
import rehypeRaw from "rehype-raw";
import { DyadWrite } from "./DyadWrite";
import { DyadRename } from "./DyadRename";
import { DyadDelete } from "./DyadDelete";
@@ -52,7 +52,6 @@ const customLink = ({
export const VanillaMarkdownParser = ({ content }: { content: string }) => {
return (
<ReactMarkdown
rehypePlugins={[rehypeRaw]}
components={{
code: CodeHighlight,
a: customLink,
@@ -82,7 +81,6 @@ export const DyadMarkdownParser: React.FC<DyadMarkdownParserProps> = ({
{piece.type === "markdown"
? piece.content && (
<ReactMarkdown
rehypePlugins={[rehypeRaw]}
components={{
code: CodeHighlight,
a: customLink,