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

Digit separators mess with comments #7824

Open
Eisenwave opened this issue Apr 11, 2025 · 2 comments
Open

Digit separators mess with comments #7824

Eisenwave opened this issue Apr 11, 2025 · 2 comments

Comments

@Eisenwave
Copy link
Contributor

To reproduce, try something like

\begin{codeblock}
unsigned x = 0xffff'ffff; // comment
\end{codeblock}

This will treat // comment as having code font, presumably because the C++ parser is not aware of digit separators, so it thinks that 'ffff; // comment is one long character literal with no closing '.

@jensmaurer
Copy link
Member

I'm not sure we can do something here.

Since we don't use digit separators often in our examples in the standard, are there specific instances where we have a problem and might want to move the comment a line above or below or similar?

@Eisenwave
Copy link
Contributor Author

Eisenwave commented Apr 11, 2025

One would think that https://eel.is/c++draft/time.format#example-1 is affected, but it seems like digit separators in decimal numbers are rendered properly.

It might be an issue limited to digit separators in hexadecimal literals.

I cannot find any improperly rendered examples. It's just something annoying I've discovered when creating some new wording that could have contained 0xff'ff'ff'ff or 0xffff'ffff.

What extension are we using for this purpose anyway? Is that something we could fix after all?

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

No branches or pull requests

2 participants