devdocs icon indicating copy to clipboard operation
devdocs copied to clipboard

Ansible/YAML docs are missing syntax highlighting

Open safeaim opened this issue 1 year ago • 3 comments

Bug report

OS information

Tested out on Firefox and Chrome, on both Windows and Mac.

Steps to reproduce

Open Ansible or Kubernetes related documentation that have example code. There is no syntax highlighting.

Possible fix

From what I can see PrismJS supports YAML, but I guess the reason is that there is no node['data-language'] set in the in clean_html filters for Ansible and Kubernetes.

I guess it might be the same for other languages that use YAML syntax.

safeaim avatar Feb 20 '24 14:02 safeaim

I'd love to contribute to this myself, however I need a little help.

Is it possible to generate docs to test a edited filter without having to scrape the website again and again for each document generation? Ie has there been implemented any sort of local caching?

safeaim avatar Feb 21 '24 00:02 safeaim

Hum.. It looks like some ansible doc do have syntax highlighting. Like this one: https://devdocs.io/ansible/user_guide/playbooks_debugger

safeaim avatar Feb 22 '24 10:02 safeaim