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] Image resources in mdx cannot be processed when img is wrapped by div #47

Open
Timeless0911 opened this issue Jun 4, 2024 · 0 comments

Comments

@Timeless0911
Copy link
Collaborator

related: web-infra-dev/rspress#1146

hast::Node::MdxJsxElement(element) => {
if let Some(name) = &element.name {
if name != "img" {
return links;
}

The above code only checks the hast node for img tag at the first level, so if we wrapped by div, it will directly return and do not add import for this resources.

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