diff --git a/crates/formats/src/html.rs b/crates/formats/src/html.rs
index 493d1b42..d382ecea 100644
--- a/crates/formats/src/html.rs
+++ b/crates/formats/src/html.rs
@@ -257,6 +257,18 @@ fn attr(attrs: &str, key: &str) -> Option {
attrs.get(start..start + end).map(unescape)
}
+fn font_size(attrs: &str) -> Option {
+ let style = attr(attrs, "style")?;
+ style.split(';').find_map(|declaration| {
+ let (property, value) = declaration.split_once(':')?;
+ if !property.trim().eq_ignore_ascii_case("font-size") {
+ return None;
+ }
+ let points = value.trim().strip_suffix("pt")?.trim().parse::().ok()?;
+ (8..=72).contains(&points).then_some(points)
+ })
+}
+
#[derive(Default)]
struct Writer {
out: String,
@@ -267,6 +279,7 @@ struct Writer {
div_diagram: bool,
in_math: bool,
in_math_block: bool,
+ span_sizes: Vec