rouge-ruby / rouge

A pure Ruby code highlighter that is compatible with Pygments
https://rouge.jneen.net/
Other
3.33k stars 735 forks source link

Cpp lexer does not highlight function definitions or declarations after the first definition #1927

Closed chfogelman closed 1 year ago

chfogelman commented 1 year ago

Name of the lexer Cpp

Code sample A sample of the code that produces the bug.

void hello() {
}
void goodbye() {
}

Additional context Only the first function definition will have the function name highlighted as such. Subsequent function definitions have their names highlighted as standard text: image

Note that the C lexer does not demonstrate the same issue: image

Note that it is simply the first function definition that causes this issue: image