20

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]?
0

1 Answer 1

21

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 Golf
  13. Code Golf Meta
  14. Code Review
  15. Computational Science
  16. Computer Graphics
  17. Computer Graphics Meta
  18. Computer Science
  19. Computer Science Educators
  20. Computer Science Educators Meta
  21. Computer Science Meta
  22. Craft CMS
  23. Craft CMS Meta
  24. Cross Validated
  25. Data Science
  26. Data Science Meta
  27. Database Administrators
  28. DevOps
  29. DevOps Meta
  30. Drupal Answers
  31. EOS.IO
  32. EOS.IO Meta
  33. Electrical Engineering
  34. Emacs
  35. Emacs Meta
  36. Ethereum
  37. Ethereum Meta
  38. Game Development
  39. Geographic Information Systems
  40. Graphic Design
  41. Graphic Design Meta
  42. Internet of Things
  43. Internet of Things Meta
  44. Magento
  45. Magento Meta
  46. Mathematica
  47. Matter Modeling
  48. Meta Stack Exchange
  49. Meta Stack Overflow
  50. Meta Super User
  51. Operations Research
  52. Operations Research Meta
  53. Quantitative Finance
  54. Quantitative Finance Meta
  55. Raspberry Pi
  56. Raspberry Pi Meta
  57. Robotics
  58. Salesforce
  59. Salesforce Meta
  60. Server Fault
  61. SharePoint
  62. Sitecore
  63. Sitecore Meta
  64. Software Engineering
  65. Software Quality Assurance & Testing
  66. Software Quality Assurance & Testing Meta
  67. Stack Apps
  68. Stack Overflow
  69. Stack Overflow Meta en español
  70. Stack Overflow em Português
  71. Stack Overflow em Português Meta
  72. Stack Overflow en español
  73. Stack Overflow на русском
  74. Stack Overflow на русском Meta
  75. Stellar
  76. Stellar Meta
  77. Substrate and Polkadot
  78. Super User
  79. TeX - LaTeX
  80. TeX - LaTeX Meta
  81. Tridion
  82. Unix & Linux
  83. Vi and Vim
  84. Video Production
  85. Video Production Meta
  86. Webmasters
  87. Webmasters Meta
  88. WordPress Development
  89. スタック・オーバーフロー
  90. スタック・オーバーフロー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 2022-04-27; 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) //Even after the changeover to Highlight.js, the Markdown extension is still called "Prettify"
         {
            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 .

0

You must log in to answer this question.

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