9
\$\begingroup\$

I thought based on this MSO question, it might be that syntax highlighting is supported here, as people rarely tag their questions with the appropriate language, so the highlighter might go into "null-mode" and do nothing. However this question of ours seems to be a counterexample, which is tagged and not highlighted.

Based on the aforementioned MSO thread, I guess our entire site is blacklisted, which it should not be. Also, it might be preferable to just live with auto-detected formatting on everything versus mandating software tags...but that's another question. Conversely, I guess we could come up with our own list of [arduino] = [lang-c], (...having trouble thinking of a common Java platform), etc.

The vast majority of code here is bound to be C, maybe some Java as well, which all should play nice with auto-detection. ASM would fail hard, but assembly isn't (as far as we care here) standardized (a.k.a.: "wtf is an x86").

\$\endgroup\$
2
  • 3
    \$\begingroup\$ Since we have almost 2,000 questions now and not a single one requires Java highlighting (according to a quick search for 'java'), and also because you couldn't come up with a Java platform, I think it's not even worth mentioning. C (and non-highlighting for assembly) is really all that's required. \$\endgroup\$ Commented Jan 7, 2011 at 22:55
  • 2
    \$\begingroup\$ Note, too, that we also have some HDL code: See verilog and vhdl. Verilog would probably be OK because it's C-like, but we'd want the VHDL extension \$\endgroup\$
    – Kevin Vermeer Mod
    Commented Sep 30, 2011 at 14:45

1 Answer 1

6
\$\begingroup\$

This is now enabled. There are 2 ways that it will kick in:

  1. A moderator can set a language hint on a tag (on the tag info page)
  2. It can be specified in the post with the code block by specifying a tag that has a hint per #1, or by specifying a lang hint:
<!-- language: lang-or-tag-here -->

    code goes here

<!-- language: lang-or-tag-here -->

    code goes here
\$\endgroup\$

You must log in to answer this question.

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