I had initially asked this on Code review meta but @Mast in the comments suggested me to ask this on the main meta site.

I have tested it on Stack overflow, Code review, and Software Engineering sites. I think stack exchange uses the same syntax highlighting engine so it should apply to all


Here is the example

int a = 5;
int c(5);

I hope the syntax highlighting works for you, if not then the way a and c are highlighted is different, shouldn't they be highlighted the same way?

c has the same highlighting as a function would have (bright orange)
whereas a has no highlight.


  • 1
    @MartijnPieters How does that answer this question? – Aryan Parekh Oct 21 '20 at 7:31
  • 1
    Sorry, was interrupted: please file bugs in the highlighter with the highlight.js project, as mentioned in that FAQ under the heading How do I report a bug or request a new language? – Martijn Pieters Oct 21 '20 at 7:35

I'm reasonably certain that this is , if only because syntax highlighting is not running off of a full parser for all languages, but rather a basic parser and parsing int c(5); as a method declaration seems ... plausible for that kind of parser.

  • 2
    Correct. It’s being matched as a function declaration. Pretty sure there’s an open issue for this too, but hard to fix. – Josh Goebel Oct 21 '20 at 5:12

Not the answer you're looking for? Browse other questions tagged .