From 64903b70f4d4f87b3ce3995603b434d90d7dbbdf Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Fri, 27 Nov 2026 23:01:45 +0000 Subject: [PATCH] model: chart zero labels keep the ? placeholders' digit-wide spaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The accounting format's zero section "-"??\ "₽" prints a space per ? (ECMA-376 18.8.31), which craft-drawingml's formatter does since the craft-libs bump (its trial russian_accounting_roubles). The old expectation dropped them. Co-Authored-By: Claude Opus 5.5 --- crates/model/src/chart.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/model/src/chart.rs b/crates/model/src/chart.rs index 38448c725..4b78f2b8a 100644 --- a/crates/model/src/chart.rs +++ b/crates/model/src/chart.rs @@ -1181,7 +1181,8 @@ mod tests { c.y_format = Some(r#"_-* #\ ##0\ "₽"_-;\-* #\ ##0\ "₽"_-;_-* "-"??\ "₽"_-;_-@_-"#.into()); c.lang = Some("ru-RU".into()); assert_eq!(c.axis_label(false, 800_000.0), "800\u{a0}000 ₽"); - assert_eq!(c.axis_label(false, 0.0), "- ₽"); + // The zero section `"-"??\ "₽"`: each `?` shows an insignificant zero as a digit-wide space (ECMA-376 §18.8.31). + assert_eq!(c.axis_label(false, 0.0), "- ₽"); // No format: General. assert_eq!(c.axis_label(true, 2.5), "2,5"); c.lang = None; @@ -1190,7 +1191,7 @@ mod tests { c.lang = Some("ru-RU".into()); c.series[0].number_format = Some(r#"#,##0\ "₽""#.into()); assert_eq!(c.data_label(&c.series[0], 516_600_000.0), "516\u{a0}600\u{a0}000 ₽"); - assert_eq!(c.data_label(&c.series[1], 0.0), "- ₽"); + assert_eq!(c.data_label(&c.series[1], 0.0), "- ₽"); } #[test]