Skip to content

Conversation

@trillium
Copy link
Contributor

@trillium trillium commented Jan 15, 2026

Overview

Preserve leading zeros when incrementing or decrementing a number.

Before:

# increment this
01 -> 2

After:

# increment this
01 -> 02
  • Add hasLeadingZeros() helper to detect numbers with leading zeros
  • Add formatNumber() function to preserve original number formatting (leading zeros and decimal places)
  • Update updateInteger() and updateFloat() to return formatted strings instead of raw numbers
  • Preserve formatting for numbers like 007008, 3.04.0, and 004.60005.60
  • Add comprehensive test fixtures for increment/decrement scenarios

@trillium trillium requested a review from a team as a code owner January 15, 2026 08:55
@trillium trillium force-pushed the preserve_leading_zeros branch from 0b1fb67 to c9be913 Compare January 15, 2026 09:01
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.

1 participant