Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve stringified numbers with leading zeros #341

Merged
merged 1 commit into from
May 14, 2023

Conversation

Pytal
Copy link
Contributor

@Pytal Pytal commented May 13, 2023

Enable the parseTrueNumberOnly option from fast-xml-parser, see docs, to preserve the leading zeros of numbers

Before

"00123" is parsed to 123

After

"00123" is parsed to "00123"

@perry-mitchell
Copy link
Owner

This is great! I can merge later today. A test would go great with this but I can also try to add one when I get time.

@perry-mitchell perry-mitchell merged commit ae43cc1 into perry-mitchell:master May 14, 2023
@Pytal Pytal deleted the fix/parse-leading-zeros branch May 19, 2023 05:11
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