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.
related: web-infra-dev/rspress#1146
mdx-rs/crates/plugin_normalize_link/src/lib.rs
Lines 189 to 193 in 18ad02b
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.