Repository navigation
fix: preserve fraction text and bound numeric formatting - #1063
Merged
Merged
Conversation
andiwand
force-pushed
the
review/44-font-test-fixtures
branch
from
October 5, 2026 13:20
5b5ca59 to
d07b544
Compare
The new head of format_fraction keeps the prefix and percent signs, but it lost the rule that a blank integer also blanks the separator before the numerator, so "#-?/?" showed 0.5 as "-1/2". The from_chars result no longer shadows the token index end, and the unreachable 32-bit guard on the integer placeholder count is gone. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gb1fLafqqzehpqPuU6uBfn
andiwand
force-pushed
the
review/45-number-format-bounds
branch
from
October 5, 2026 13:59
9fbaaf8 to
d7eaa56
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Generated with Claude Code
Fraction formats dropped prefixes and percent signs, misread a fixed denominator followed by text (
?/8" kg"), and overflowed integer rounding for large finite values. Preserve the surrounding tokens and keep rounded numerators as doubles, formatting them without narrowing to integers.Fall back to General for unrepresentable fixed fractions and scientific mantissas. Use the shared ASCII case conversion when parsing format codes, avoiding locale-dependent behavior and signed-character undefined behavior.
Validation: rebuilt
odr_test; all 41 number-format, ODF format and XLSX value tests passed. Regression assertions extend the existing fraction test; one focused test covers scientific overflow.