From 6d19bb44f36b97f08fb11d0945f557bb0a5fcb7c Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Sat, 14 Nov 2026 12:33:33 +0000 Subject: [PATCH] fix(docx): preserve Normal inference compatibility --- crates/docx/src/read/styles.rs | 2 +- crates/wordmodel/src/styles.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/docx/src/read/styles.rs b/crates/docx/src/read/styles.rs index b1d7388e6..da28dfd0f 100644 --- a/crates/docx/src/read/styles.rs +++ b/crates/docx/src/read/styles.rs @@ -127,7 +127,7 @@ impl Reader<'_> { // doesn't nominate another style. Keep that fact for an explicitly declared // Normal; the gallery later synthesizes a visually identical Normal when the // file did not declare one, and that synthetic style is not source provenance. - normal_is_default = Some(s.attr("w:default").is_none_or(|value| !matches!(value.trim(), "0" | "false" | "off" | "False" | "FALSE"))); + normal_is_default = Some(s.attr("w:default").is_none()); } let name = s.child_val("w:name").map(ui_style_name).unwrap_or_else(|| id.clone()); let r = |n: &str| s.child_val(n).filter(|v| !v.is_empty()).map(|v| self.pc.style_id(v)); diff --git a/crates/wordmodel/src/styles.rs b/crates/wordmodel/src/styles.rs index 8ecbda0c2..5383c1510 100644 --- a/crates/wordmodel/src/styles.rs +++ b/crates/wordmodel/src/styles.rs @@ -538,7 +538,7 @@ impl StyleSheet { latent_styles: None, }; let mut add = |st: Style| s.styles.push(st); - add(Style { id: "Normal".into(), name: "Normal".into(), priority: Some(0), quick: true, default: true, ..p_style() }); + add(Style { id: "Normal".into(), name: "Normal".into(), priority: Some(0), quick: true, ..p_style() }); add(Style { id: "DefaultParagraphFont".into(), name: "Default Paragraph Font".into(),