Skip to content

fix: accept digit grouping in site file integers - #336

Open
HaoZeke wants to merge 1 commit into
mainfrom
fix/toml-integer-underscores
Open

HaoZeke wants to merge 1 commit into
mainfrom
fix/toml-integer-underscores

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

fix: accept digit grouping in site file integers

Tom's Obvious Minimal Language (TOML) allows 1_000 as one thousand. A
single "" may sit between two digits of a decimal integer. A leading
zero, a doubled "
" and a "" at either end of the digits stay invalid.
The frozen Bash script reads legacy configuration keys and never parses
a site-file integer. The Zig site parser follows the TOML grammar for
decimal integers. Zig's parseInt accepts a doubled "
" that the grammar
rejects, so the parser checks the grammar before it converts the value.

Tom's Obvious Minimal Language (TOML) allows 1_000 as one thousand. A
single "_" may sit between two digits of a decimal integer. A leading
zero, a doubled "_" and a "_" at either end of the digits stay invalid.
The frozen Bash script reads legacy configuration keys and never parses
a site-file integer. The Zig site parser follows the TOML grammar for
decimal integers. Zig's parseInt accepts a doubled "_" that the grammar
rejects, so the parser checks the grammar before it converts the value.

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.

1 participant