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?
1 Answer
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 -->
-
3Thanks. This will help prevent redundant
python
tags on questions.– user3461Commented Jul 2, 2013 at 14:11 -
3Thank you, this will spare me the
<!-- language: lang-py -->
code in every answer. Is a certain reputation already required for proposing a code language? I don't see such a prompt. Commented Jul 2, 2013 at 15:00 -
1@Matthias The prompt might be there only at higher reputations. I guess the threshold may be either 10K or 20K.– whuber ModCommented Jul 2, 2013 at 15:19
-
2
-
1