21

On SU, can we remove the default syntax highlighting? It seems that most uses for the Markdown 4-space-indent-code-block on SU are not actual code, and the syntax highlighting is more of a hindrance than a help.

I think what SU really needs isn't a code block, but a preformatted block, and I think the user-friendliest implemementation would simply change the 4-space-indent Markdown to render as <pre></pre> instead of <pre><code></code></pre>.


Here's one awful example (see the first revision). The syntax highlighting was useless to the final rendering of the post, and it made the post hideously slow to load.

  • 6
    Brilliant. It would save all the peculiar syntax highlighting one gets when printing a routing table or a configuration file. – Ether Feb 23 '10 at 3:40
  • 6
    Also, on the off chance someone does legitimately want color-coding (maybe editing an XML configuration file or something), that person will probably be technical enough to type <pre><code>...</code></pre> him- or herself. – Dr. Gonzo Feb 23 '10 at 14:41
  • 1
    There's routing tables on superuser?? – Sam Cogan Feb 23 '10 at 16:21
  • 1
    @Sam_Cogan: yeah, there are. ServerFault doesn't want home-networking questions. – quack quixote Feb 24 '10 at 0:18
  • 1
    Still some highlighting I'd like: a fat red underline when the space between Super and User or Stack and Flow or Server and Fault is missing ;-) – Arjan Feb 27 '10 at 16:55
  • 5
    @Arjan: maybe when they show a space in the site logos i'll start remembering that the names of these sites contain spaces. until then, you should totally write a greasemonkey script for that. :) – quack quixote Feb 27 '10 at 17:33
  • 1
    @~quack, here's a bookmarklet for you instead ;-) jsbin.com/awina – Arjan Feb 27 '10 at 19:21
  • @Arjan: +1 for hilarity. but i meant a script to do what you said: the fat red underline when the space is missing. :) – quack quixote Feb 27 '10 at 19:34
  • Of course, I know you meant. Unless you know of a way to force everyone to use such script, I guess editing is actually easier. Too bad I cannot edit at Meta ;-) – Arjan Feb 27 '10 at 19:38
  • hmmm. fair point. in that case could you modify the other trilogy logos too? – quack quixote Feb 28 '10 at 4:30
  • The name of the site is in the title bar, logos often mash words together as one. – random Mar 5 '10 at 0:55
  • +! this is a great idea! – Paul Nathan Mar 5 '10 at 1:06
  • I believe this should apply to server fault as well. I frequently want to post pre-formated text, that isn't source code there. I think the need for highlighted source code is pretty rare. – Zoredache Mar 5 '10 at 1:07
  • If you need to dump points, you need to bounty up old questions. – random Mar 30 '10 at 9:58
  • @random: don't think i'm not considering it. but should i really be dumping points into Jeff of all people?? – quack quixote Mar 30 '10 at 11:02
1

I agree, we probably don't need syntax highlighting on Super User -- it can now be disabled on a per-site basis.

(The prettify JavaScript is still served; that'd be a much deeper change.)

  • 5
    From my initial testing, using user0x36E0's suggestion from the comments will not work to get the syntax highlighting if we need it? Is there any way to get it? – heavyd Mar 5 '10 at 8:01

You must log in to answer this question.