6

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 1

7

Syntax highlighting for tags can be specified by

  1. Navigating to the tags page
  2. Searching for a tag, hovering over it with the mouse to raise a pop-up, and selecting "info".
  3. 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 -->
5
  • 3
    Thanks. This will help prevent redundant python tags on questions.
    – user3461
    Commented Jul 2, 2013 at 14:11
  • 3
    Thank 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 Mod
    Commented Jul 2, 2013 at 15:19
  • 2
    It must be at least 20K because at ~18K I don't see it.
    – blah238
    Commented Jul 2, 2013 at 19:31
  • 1
    @BERA Good suggestion: done.
    – whuber Mod
    Commented Oct 8, 2019 at 13:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .