mod marks;
mod typography;
use crate::options::ConversionOptions;
use tl::{NodeHandle, Parser};
type Context = crate::converter::Context;
type DomContext = crate::converter::DomContext;
pub fn handle(
tag_name: &str,
node_handle: &NodeHandle,
parser: &Parser,
output: &mut String,
options: &ConversionOptions,
ctx: &Context,
depth: usize,
dom_ctx: &DomContext,
) {
match tag_name {
"mark" => {
marks::handle_mark(node_handle, parser, output, options, ctx, depth, dom_ctx);
}
"del" | "s" => {
marks::handle_strikethrough(tag_name, node_handle, parser, output, options, ctx, depth, dom_ctx);
}
"ins" => {
marks::handle_inserted(node_handle, parser, output, options, ctx, depth, dom_ctx);
}
"u" => {
marks::handle_underline(node_handle, parser, output, options, ctx, depth, dom_ctx);
}
"small" => {
typography::handle_small(node_handle, parser, output, options, ctx, depth, dom_ctx);
}
"sub" => {
typography::handle_subscript(node_handle, parser, output, options, ctx, depth, dom_ctx);
}
"sup" => {
typography::handle_superscript(node_handle, parser, output, options, ctx, depth, dom_ctx);
}
"var" => {
typography::handle_variable(node_handle, parser, output, options, ctx, depth, dom_ctx);
}
"dfn" => {
typography::handle_definition(node_handle, parser, output, options, ctx, depth, dom_ctx);
}
"abbr" => {
typography::handle_abbreviation(node_handle, parser, output, options, ctx, depth, dom_ctx);
}
"span" => {
typography::handle_span(node_handle, parser, output, options, ctx, depth, dom_ctx);
}
_ => {}
}
}