Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] react-markdown引入remark-directive插件后,渲染报错 #203

Open
jiangmitiao opened this issue Dec 4, 2024 · 0 comments
Open

Comments

@jiangmitiao
Copy link

💻 系统环境 | Operating System

Windows

🌐 浏览器 | Browser

Chrome

🐛 问题描述 | Bug Description

import remarkDirective from 'remark-directive';

const content = `
:::alert{aaa="123"}
这是内容
:::

`
<Markdown
  remarkPlugins={[[remarkDirective]]}>
  {content}
</Markdown>

使用{}包裹属性时,会报Cannot set properties of undefined (setting 'directiveAttributes'),直接使用react-markdown 9.0.1版本没有此问题,但如果强行覆盖使用9.0.1版本,code就无法渲染了。

🚦 期望结果 | Expected Behavior

No response

📷 复现步骤 | Recurrence Steps

No response

📝 补充信息 | Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant