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

use space in lang.NumFmt options #5260

Closed
legrostdg opened this issue Sep 28, 2018 · 2 comments · Fixed by #5271
Closed

use space in lang.NumFmt options #5260

legrostdg opened this issue Sep 28, 2018 · 2 comments · Fixed by #5271
Assignees
Milestone

Comments

@legrostdg
Copy link

With French typographic rules, prices are supposed to be printed that way:

1 000,23€

But I can't get lang.NumFmt to print a space instead of a dot... I tried lang.NumFmt 2 (.Get 0) "- , " and lang.NumFmt 2 (.Get 0) "- ,  " (nbsp), but both are replaced by no space at all. lang.NumFmt 2 (.Get 0) "- ,  " gave 1 000,23 and lang.NumFmt 2 (.Get 0) "- , \ " nothing at all.

@bep
Copy link
Member

bep commented Sep 28, 2018

/cc @moorereason

@moorereason moorereason self-assigned this Sep 28, 2018
@moorereason moorereason added this to the v0.50 milestone Sep 28, 2018
moorereason added a commit to moorereason/hugo that referenced this issue Oct 2, 2018
The original implementation of NumFmt did not take into account that the
options delimiter (a space) could be a valid option.  Adding a delim
parameter seems like the simplest, safest, and most flexible way to
solve this oversight in a backwards-compatible way.

Fixes gohugoio#5260
@bep bep closed this as completed in #5271 Oct 2, 2018
bep pushed a commit that referenced this issue Oct 2, 2018
The original implementation of NumFmt did not take into account that the
options delimiter (a space) could be a valid option.  Adding a delim
parameter seems like the simplest, safest, and most flexible way to
solve this oversight in a backwards-compatible way.

Fixes #5260
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants