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

Add device tree support #2021

Open solidDoWant opened 5 months ago

solidDoWant commented 5 months ago

Is your enhancement request related to a problem? Please describe. Device tree source files are not recognized when parsed by Rouge. I'm using Jekyll writing some guides on how to build these files, however code blocks marked as dts or device-tree are not properly formatted when converting to HTML as Jekyll doesn't support the language.

Describe the solution you'd like Rouge (and therefor Jekyll) support for device tree source files.

Additional context Device trees have been around for a decade or two and are the de facto way of telling low level code (such as BIOS type firmware and low level Linux kernel initialization code) about what hardware devices are available in a system. There is a formal standard here that describes the language. Both U-Boot and the Linux kernel have thousands of examples of this - just search for files ending in ".dts" or ".dtsi" in either source tree.