Skip to content

Commit

Permalink
🐛 fix: 修复一个特殊引入导致的上层解析问题 (#178)
Browse files Browse the repository at this point in the history
* 🐛 fix: slove DOMPurify import error problem

* ✨ feat: update snapshot
  • Loading branch information
ONLY-yours committed Apr 12, 2024
1 parent 96010e1 commit 04a7f98
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 69 deletions.
2 changes: 1 addition & 1 deletion src/Highlight/hooks/useShiki.tsx
@@ -1,4 +1,4 @@
import * as DOMPurify from 'dompurify';
import DOMPurify from 'dompurify';
import { useEffect, useState } from 'react';
import { getHighlighter, type Highlighter } from 'shiki/bundle/web';
import { themeConfig } from '../theme';
Expand Down
74 changes: 6 additions & 68 deletions tests/__snapshots__/demo.test.tsx.snap
Expand Up @@ -15936,40 +15936,14 @@ export interface MarkdownProps {

const MemoHr = memo((props) => (

<divider
'1em',=""
0=""
marginbottom:=""
margintop:=""
style="{{"
{...props}=""
}}=""
>

));
const MemoDetails = memo((props) =&gt;
<collapse
'1em'=""
marginbottom:=""
style="{{"
{...props}=""
}}=""
>
);
const MemoDetails = memo((props) =&gt; );
const MemoImage = memo((props) =&gt;
<img
{...props}=""
/>
);
const MemoAlink = memo((props) =&gt;
<typography.link
{...props}=""
>
);
<img />
);
const MemoAlink = memo((props) =&gt; );

const Markdown = memo
<markdownprops>
(
const Markdown = memo(
({
children,
className,
Expand All @@ -15993,44 +15967,17 @@ const Markdown = memo

return (

<typography
classname="{className}"
ondoubleclick="{onDoubleClick}"
style="{style}"
>


<reactmarkdown
as=""
classname="{styles.markdown}"
components="{components}"
pluggablelist}=""
rehypeplugins="{rehypePlugins"
remarkplugins="{remarkPlugins"
{...rest}=""
>

{children}

</reactmarkdown>


</typography>

);
},
);

export default withProvider(Markdown) as React.FC
<markdownprops>
;
export default withProvider(Markdown) as React.FC;


</markdownprops>
</markdownprops>
</typography.link>
</collapse>
</divider>
</code>
</pre>
</div>
Expand Down Expand Up @@ -17296,16 +17243,7 @@ id sem consectetuer libero luctus adipiscing.



<meta
charset="UTF-8"
/>


<meta
content="width=device-width, initial-scale=1.0"
name="viewport"
/>


<title>
Custom Html Dom Render
Expand Down

0 comments on commit 04a7f98

Please sign in to comment.