fix(docx): preserve Normal inference compatibility

This commit is contained in:
Dylan M. Taylor committed 2026-11-14 13:25:25 +00:00
1 parent 6beefd7e95
commit 6d19bb44f3
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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));
+1 -1
View File
@@ -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(),