pub mod attributes;
pub mod definition_list;
pub mod figure;
pub mod sectioning;
pub mod summary;
pub use super::walk_node;
pub use super::{Context, DomContext};
pub use attributes::handle as handle_attributes;
pub use definition_list::handle as handle_definition_list;
pub use figure::handle as handle_figure;
pub use sectioning::handle as handle_sectioning;
pub use summary::handle as handle_summary;
pub fn dispatch_semantic_handler(
tag_name: &str,
node_handle: &tl::NodeHandle,
parser: &tl::Parser,
output: &mut String,
options: &crate::options::ConversionOptions,
ctx: &super::Context,
depth: usize,
dom_ctx: &super::DomContext,
) -> bool {
match tag_name {
"article" | "section" | "nav" | "aside" | "header" | "footer" | "main" => {
handle_sectioning(tag_name, node_handle, parser, output, options, ctx, depth, dom_ctx);
true
}
"figure" | "figcaption" => {
handle_figure(tag_name, node_handle, parser, output, options, ctx, depth, dom_ctx);
true
}
"details" | "summary" | "dialog" => {
handle_summary(tag_name, node_handle, parser, output, options, ctx, depth, dom_ctx);
true
}
"hgroup" | "dl" | "dt" | "dd" | "menu" => {
handle_definition_list(tag_name, node_handle, parser, output, options, ctx, depth, dom_ctx);
true
}
"cite" | "q" | "abbr" | "dfn" | "time" | "data" => {
handle_attributes(tag_name, node_handle, parser, output, options, ctx, depth, dom_ctx);
true
}
_ => false,
}
}