Skip to content

Conversation

@heavywatal
Copy link
Contributor

Currently the result of fmt::format("{:>10}", color::blue) is displayed inline as blue with a collapsed whitespace, which is confusing.

Currently the result of `fmt::format("{:>10}", color::blue)` is displayed inline as ` blue` with a collapsed whitespace, which is confusing.
@vitaut
Copy link
Contributor

vitaut commented Nov 24, 2025

I am not sure I understand the issue. Could you provide screenshots of the relevant part of the docs before/after the change?

@heavywatal
Copy link
Contributor Author

Before:
HTML <code>" blue"</code> is rendered as " blue" by default in most browsers like this:
code-default

After:
HTML <code>" blue"</code> is rendered as " blue", which can be achieved with CSS like code {white-space: pre-wrap} (GitHub chose white-space: break-spaces;):
code-pre-wrap

https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/white-space

@vitaut
Copy link
Contributor

vitaut commented Nov 25, 2025

Nice catch, thanks!

@vitaut vitaut merged commit 4c77b46 into fmtlib:master Nov 25, 2025
@heavywatal heavywatal deleted the patch-1 branch November 25, 2025 00:32
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