7

The code syntax highlighting feature is only enabled on certain sites. In order for code to be highlighted and for any of the hints listed in the above question to work, the Markdown extension has to be enabled on the site where one's posting code.

  • Which sites have this enabled?
  • How do I request that it be enabled on [site X]?
6

Which Stack Exchange sites have syntax highlighting enabled?

The syntax highlighting feature is enabled on the following sites:

  1. Arduino
  2. Arduino Meta
  3. Ask Different
  4. Ask Ubuntu
  5. Bioinformatics
  6. Bioinformatics Meta
  7. Blender
  8. CS50
  9. CS50 Meta
  10. Chemistry
  11. Chemistry Meta
  12. Code Review
  13. Computational Science
  14. Computer Graphics
  15. Computer Graphics Meta
  16. Computer Science
  17. Computer Science Educators
  18. Computer Science Educators Meta
  19. Computer Science Meta
  20. Craft CMS
  21. Craft CMS Meta
  22. Cross Validated
  23. Data Science
  24. Data Science Meta
  25. Database Administrators
  26. DevOps
  27. DevOps Meta
  28. Drupal Answers
  29. EOS.IO
  30. EOS.IO Meta
  31. Electrical Engineering
  32. Emacs
  33. Emacs Meta
  34. Ethereum
  35. Ethereum Meta
  36. Game Development
  37. Geographic Information Systems
  38. Graphic Design
  39. Graphic Design Meta
  40. Internet of Things
  41. Internet of Things Meta
  42. Magento
  43. Magento Meta
  44. Mathematica
  45. Meta Stack Exchange
  46. Meta Stack Overflow
  47. Meta Super User
  48. Programming Puzzles & Code Golf
  49. Programming Puzzles & Code Golf Meta
  50. Raspberry Pi
  51. Raspberry Pi Meta
  52. Robotics
  53. Salesforce
  54. Salesforce Meta
  55. Server Fault
  56. SharePoint
  57. Sitecore
  58. Sitecore Meta
  59. Software Engineering
  60. Software Quality Assurance & Testing
  61. Software Quality Assurance & Testing Meta
  62. Stack Apps
  63. Stack Overflow
  64. Stack Overflow Meta en español
  65. Stack Overflow em Português
  66. Stack Overflow em Português Meta
  67. Stack Overflow en español
  68. Stack Overflow на русском
  69. Stack Overflow на русском Meta
  70. Stellar
  71. Stellar Meta
  72. Super User
  73. TeX - LaTeX
  74. TeX - LaTeX Meta
  75. Tridion
  76. Unix & Linux
  77. Vi and Vim
  78. Video Production
  79. Video Production Meta
  80. Webmasters
  81. Webmasters Meta
  82. WordPress Development
  83. スタック・オーバーフロー
  84. スタック・オーバーフローMeta

Note that the above list consists of per-site metas as well, as there are some sites where it's enabled on the main site but not on the corresponding per-site meta. The above list was last updated 2019-03-15; if it becomes outdated, please copy the Markdown generated by the below code snippet and replace the above list with that, and then update the date here.

The following code snippet fetches the list of sites with syntax highlighting enabled.

$.get('https://api.stackexchange.com/2.2/sites?pagesize=500&filter=!*L6SiaRiUSk*Z2zr', function(data) {
    var i,
        $result = $('#result'),
        $md = $('#md'),
        sites = [],
        specials = {
          biology : { mhchem: true},
          chemistry: {mhchem: true },
          earthscience: {mhchem: true },
          electricalengineering: {delim: true},
          codereview: {delim: true}
          },
        sec,
        extra;
     for(i=0; i < data.items.length; i++) {
       if (data.items[i].markdown_extensions &&
           data.items[i].markdown_extensions.indexOf('Prettify')>-1)
         {
            sites.push(data.items[i]);
         }
       }
    sites.sort(function(l,r) { return l.name<r.name?-1:1; });
    for(i = 0; i < sites.length; i = i + 1) {
        $result.append(
            $('<li></li>').html(sites[i].name)
        );
        $md.append(
           $('<pre></pre>').html('1. [' + sites[i].name+'](' + sites[i].site_url.substr(sites[i].site_url.indexOf(':') + 1) + ')')
        );
    }
  });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<ol id="result">
</ol>

<div id="md">
</div>

The above snippet was originally written by rene here for fetching the list of sites with MathJax enabled, and later modified with the help of user315433 in chat to support fetching the list of sites with syntax highlighting enabled.

How do I request that syntax highlighting be enabled on [site X]?

This feature is enabled on sites with a relatively strong focus on programming. Normally, it will be enabled by staff when newly creating the site, based on the scope of the site's Area 51 proposal. If, for some reason it's not enabled on a site where it should be, post a request on the site's per-site meta.

If a topic isn't primarily focused on programming but could substantially benefit from a particular flavor of syntax highlighting, post a request on the site's per-site meta and link to some (10 or so) posts where highlighting would be helpful. SE staff will then evaluate the request and let you know the result.

If syntax highlighting is enabled on a main site but not on its per-site meta, and you feel it's useful to have enabled on the meta site, post the request on the per-site meta itself and tag it .

  • Should some particular tag be added to attract the attention of SE staff? – OrangeDog Aug 30 '18 at 13:12

You must log in to answer this question.

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