question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

C/C++ Incorrect highlighting for LL suffix

See original GitHub issue

Describe the issue Only the first L is highlighted when the LL integer literal suffix is used

Which language seems to have the issue? C and C++

Are you using highlight or highlightAuto? I don’t know. I’ve just seen the issue on StackOverflow …

Sample Code to Reproduce

No code, but some questions where the issue occurs

Screenshot:

Screen Shot 2020-12-16 at 3 36 59 PM

Expected behavior Both Ls should be highlighted

Additional context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
phuclv90commented, Dec 16, 2020

Sorry I haven’t looked at the source code of highlight.js yet, and currently I don’t have enough time to look through it. May be at the weekend

0reactions
joshgoebelcommented, Dec 17, 2020

Current rule, line 73 c-like:

begin: '(-?)\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)(u|U|l|L|ul|UL|f|F|b|B)'
Read more comments on GitHub >

github_iconTop Results From Across the Web

Cant Highlight Text - Adobe Support Community - 10104672
No visible highlight, but I can select as normal and it will act like it's highlighted when I change font, color, etc.
Read more >
macros - How to make \hl (highlighting) to automatically place ...
When a command is registered this way, soul will first expand it (including the argument), and then feed the result as a whole...
Read more >
C++ code file extension? What is the difference between .cc ...
GNU GCC recognises all of the following as C++ files, and will use C++ ... other suffixes to indicate special handling, for example...
Read more >
syntax - Vim documentation
This will cause the wrong default highlighting to be used. ... +- Install autocmds based on suffix to set the 'filetype' option |...
Read more >
List of the armcc error and warning messages - Arm Developer
To eliminate the warning, if the constant should be treated as a (64-bit) long long type rather than a signed long , explicitly...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found