godotengine / godotengine/godot-docs
Unwanted styles are being applied to code blocks by the `.highlight` class
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Description
#### **Your Godot version:**
Latest (4.0)
#### **Issue description:**
The current `.highlight` styles appear to be applying styles for a specific lexer/language (presumably `shell`) to all code-blocks regardless of their language. Instead, language specific styles should be set in their language specific highlight class (e.g. `.highlight-shell` and `.highlight-powershell`).
- This issue is why the `batch` and `powershell` lexers also have drawbacks. They both are having unwanted styles applied to them from the blanket `.highlight` class.
- Until this issue is addressed, a good solution to prevent unwanted styling is to utilize `.. code-block:: none` which will prevent any styling from being applied to a code-block.
### Example: `.. code-block:: batch` command treated as comment.

``` html
C:\godot> scons platform=windows target=template_debug arch=x86_32
C:\godot> scons platform=windows target=template_release arch=x86_32
C:\godot> scons platform=windows target=template_debug arch=x86_64
C:\godot> scons platform=windows target=template_release arch=x86_64
```

### The highlight class and child classes
https://github.com/godotengine/godot-docs/blob/361bdfc6d000172df5d46913cce4fbcaaba0f0e5/_static/css/custom.css#L820-L924
#### **URL to the documentation page (if already existing):**
[This section is shown in the above example.](https://docs.godotengine.org/en/latest/contributing/development/compiling/compiling_for_windows.html#creating-windows-export-templates)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.