As can be read here, syntax highlighting can be inferred from the question tag. It can be assumed, that for pyqgis questions python highlighting is appropriate in most of the cases, but this hint seems not to be present for this tag (e.g. this answer). Is there a reason for this or can this simply be added?
Syntax highlighting for tags can be specified by
- Navigating to the tags page
- Searching for a tag, hovering over it with the mouse to raise a pop-up, and selecting "info".
- Choosing an appropriate code (such as "lang-py") from the "Code Language" prompt.
Only moderators can make such changes, so I have just made them for all the "py"-related tags that are reasonably popular (the top 10 of them, appearing more than twice each).
In any individual post you can override the default (even when the default is no language) by inserting the following non-indented line (surrounded by blank lines) just before the code:
<!-- language: lang-py -->