rouge-ruby / rouge

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

Fix highlight of functions in CPP lexer #1928

Closed tancnle closed 1 year ago

tancnle commented 1 year ago

This fixes a bug where closing bracket does not pops out of the function state and causes subsequent functions not to be highlighted correctly. This change ensures closing bracket in statements mixin is detecting the function state.

Before After
before after

Closes https://github.com/rouge-ruby/rouge/issues/1927