Describe the issue
is valid code, using ' as a digit separator. Highlight.js incorrectly treats it as a beginning of a string.
Which language seems to have the issue?
I tested C and C++, both get it wrong.
Are you using highlight or highlightAuto?
No clue. I originally noticed the issue while sending code over Discord and confirmed it again with your demo. I did select the language manually in both cases.
Expected behavior
The ' character should be treated as part of the number.
Additional context
Support for this separator has been around in C++ since C++14, but it's relatively new in C, added in C23.
Describe the issue
is valid code, using
'as a digit separator. Highlight.js incorrectly treats it as a beginning of a string.Which language seems to have the issue?
I tested C and C++, both get it wrong.
Are you using
highlightorhighlightAuto?No clue. I originally noticed the issue while sending code over Discord and confirmed it again with your demo. I did select the language manually in both cases.
Expected behavior
The
'character should be treated as part of the number.Additional context
Support for this separator has been around in C++ since C++14, but it's relatively new in C, added in C23.