-
-
Notifications
You must be signed in to change notification settings - Fork 918
Description
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and discussions and couldn’t find anything (or linked relevant results below)
Affected package
react-markdown@8.0.7 react-markdown@10.1.0
Steps to reproduce
<ReactMarkdown
remarkPlugins={[RemarkMath, [RemarkGfm, { singleTilde: false }], RemarkBreaks]}
rehypePlugins={[
RehypeKatex,
[
RehypeHighlight,
{
detect: false,
ignoreMissing: true
}
]
]}
components={{
pre: PreCode,
p: (pProps) => <p {...pProps} dir="auto" />,
a: (aProps) => {
const href = aProps.href || ''
const isInternal = /^/#/i.test(href)
const target = isInternal ? '_self' : aProps.target ?? '_blank'
return <a {...aProps} target={target} />
},
code: (cProps) => {
if (cProps.inline) {
//
}
return <code {...cProps} />
}
}}
>
{escapedContent}
Actual behavior
When starting a React project, an error always occurs: "Identifier 'document' has already been declared", which prevents the project from launching.
Expected behavior
run normally
Runtime
node@20.19.3
Package manager
No response
Operating system
No response
Build and bundle tools
No response