Skip to content

Preserve whitespace in literal-only number format sections - #362

Merged
MathNya merged 1 commit into
MathNya:masterfrom
developer0hye:fix/preserve-literal-section-whitespace
Sep 6, 2026
Merged

Preserve whitespace in literal-only number format sections#362
MathNya merged 1 commit into
MathNya:masterfrom
developer0hye:fix/preserve-literal-section-whitespace

Conversation

@developer0hye

Copy link
Copy Markdown
Contributor

Summary

  • preserve leading and trailing whitespace decoded from literal-only number-format sections
  • keep escaped spaces in zero-display formats so right-aligned output retains Excel spacing
  • extend the Fix literal-only zero number format sections #361 regression to assert the complete formatted string

Problem

#361 correctly selects and decodes a placeholder-free zero section, but the early return trims its result. For #,##0_);[Red]\(#,##0\);\-\ \ that changes the requested - display to -, shifting a right-aligned dash by the width of two spaces.

Testing

  • cargo test --lib (119 passed)
  • cargo clippy -- -D warnings
  • cargo +nightly fmt --all -- --check
  • git diff --check

Follow-up to #361.

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
@developer0hye

Copy link
Copy Markdown
Contributor Author

CI is currently red for failures already present on the base branch, rather than for this two-line change:

  • build (1.88.0) resolves aes 0.9.3, which requires Rust 1.89. The repository does not pin a lockfile for this job.
  • formatting reports existing rustfmt drift across unrelated files such as src/helper/date.rs, src/reader/driver.rs, and src/writer/streaming_writer.rs.

The same base-wide failures are visible on the recently merged #361 and on the upstream master workflow. Locally, the focused regression is red before the change and green after it; cargo test --lib passes all 119 tests, and cargo clippy -- -D warnings passes.

@MathNya

MathNya commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Thank you for the PR.
I'll go ahead and merge it.

@MathNya
MathNya merged commit 4acfa36 into MathNya:master Sep 6, 2026
0 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants