Skip to content

Fix literal custom decimal separators - #241

Open
jakezwang wants to merge 1 commit into
EvanHahn:mainfrom
jakezwang:fix-literal-decimal-separators
Open

jakezwang wants to merge 1 commit into
EvanHahn:mainfrom
jakezwang:fix-literal-decimal-separators

Conversation

@jakezwang

Copy link
Copy Markdown

Custom decimal separators currently use replacement-string syntax: humanizeDuration(1250, { decimal: '$$' }) produces 1$25 seconds, and $& becomes a period. Return the separator from a replacement callback so it stays literal, matching the behavior with digit replacements.

Cover replacement tokens in the decimal option and a custom language's decimal separator. Update the history and contributor credits as requested by CONTRIBUTING.md.

Validation: npm test passes on Node 26 and 24, including formatting, lint, type checking, and all 35 tests.

@EvanHahn

Copy link
Copy Markdown
Owner

Thanks. I'll review in the next couple of weeks.

This branch has not been deployed

No deployments
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