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

Accept colon(s) in YAML key names #1888

Closed gdubicki closed 1 year ago

gdubicki commented 1 year ago

as it's ok according to the YAML specs and is widely used in the real world, f.e. in Puppet's Hiera (https://puppet.com/docs/puppet/7/hiera_quick.html#values_common_data)

gdubicki commented 1 year ago

Same PR for pygments: https://github.com/pygments/pygments/pull/2277. Update: it’s merged. 😊

gdubicki commented 1 year ago

This is a follow-up to #1667.

The main motivation is to fix the syntax highlight in GitLab, where now Puppet's Hiera is treated badly. Example:

Screenshot 2022-11-14 at 11 40 28

Note how only the simple classes key is highlighted but profiles::common::pod is not.

tancnle commented 1 year ago

Thank you for your contribution @gdubicki πŸ™‡πŸΌ The PR looks good to me πŸš€