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

🐛 fix: 修复一个特殊引入导致的上层解析问题 #178

Merged
merged 2 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Highlight/hooks/useShiki.tsx
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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