rouge-ruby / rouge

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

Fix template highlight of braces in CPP lexer #1839

Closed tancnle closed 2 years ago

tancnle commented 2 years ago

Fix highlight of braces {} in template statement in CPP lexer.

I have also added an example and verified it via the visual test site.

Screen Shot 2022-06-25 at 10 46 04 am

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

tancnle commented 2 years ago

👋🏼 @MC-DeltaT could you kindly review this PR and see if it addresses the reported issue? 🙏🏼

MC-DeltaT commented 2 years ago

I honestly have very little knowledge of this repo, so not sure I'm any good as a reviewer... But if it addresses those two examples with the lambda and requires then I'm happy. I guess "punctuation" is the most appropriate token type.

Thanks for fixing it so quickly!