Prevent overfull inline math from overlapping words

This commit is contained in:
gloamxun committed 2026-10-20 01:37:54 +08:00
1 parent 5d4920eb29
commit e1060924bf
1 file changed
+10
+10
View File
@@ -5057,3 +5057,13 @@ fn math_mu_scaled(style: Style, units: Scaled) -> Mm {
fn min_mm(left: Mm, right: Mm) -> Mm {
if left <= right { left } else { right }
}
#[cfg(test)]
mod line_item_tests {
use super::{InlineMathItem, Mm};
#[test]
fn negative_inline_glue_keeps_a_minimum_word_space() {
assert_eq!(InlineMathItem::Glue(Mm::from(-2.0)).width(), Mm::from(0.6));
}
}