You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is there a way to fallback the original handler after add_handler? #23
Hi, I wonder if we can have a customized handler and have a fallback to the default handler after it?
HtmlToMarkdown::builder()
.add_handler(vec!["img"], move |el: Element| {
if let Some(src) = find_attrs(el.attrs, "src") {
// collecting src
}
// fall back to the default img_handler rather than an empty string
None
})
Sorry for the late reply, as I've been away from Rust for a while. Regarding this issue, there is currently no fallback mechanism to support this usage. However, there will be a chance to improve the API to support fallback in the future, PRs are also welcome!
Activity
letmutex commentedon May 9, 2025
Sorry for the late reply, as I've been away from Rust for a while. Regarding this issue, there is currently no fallback mechanism to support this usage. However, there will be a chance to improve the API to support fallback in the future, PRs are also welcome!