15
\$\begingroup\$

Since most questions on this site won't be language specific, but virtually all answers will contain code, the tag-based syntax-highlighting approach recently adopted by SO won't work for this site. However I think that syntax highlighting would be worthwhile to have nonetheless.

I thus propose that the old mode of syntax highlighting be enabled for this site, where all the code samples are highlighted using prettify's default "guess" mode.

| |
\$\endgroup\$
2
\$\begingroup\$

I agree. Perhaps we could turn on syntax highlighting with no hints only when the tag is used. I have always preferred to be specific by using this tag over letting users assume it's implied by the lack of a language tag.

| |
\$\endgroup\$
  • \$\begingroup\$ I'm not fond of having a tag that applies to almost every question. Though that's a different discussion. \$\endgroup\$ – sepp2k Jan 30 '11 at 16:34
  • \$\begingroup\$ @sepp2k It might be the case now, but we've only been going on 2 days. It's one of the many things time will tell. \$\endgroup\$ – moinudin Jan 30 '11 at 16:39
2
\$\begingroup\$

Given that SO's syntax highlighter is notoriously bad for plenty of source code I'd rather prefer no syntax highlighting to broken one.

If there was a way to hint a specific language to use that might be an option. But prettify's own detection is (imho) worse than no highlighting at all. And »Supports all C-like, Bash-like, and XML-like languages« was definitely not enough on SO; it may well be not enough here.

| |
\$\endgroup\$
1
\$\begingroup\$

I'd like syntax highlighting. Here's my idea:

We could use:

<meta language="C++" />

Here's some code:

    #include <iostream>

    int main()
    {
        std::cout << "Skynet imported for the 42nd time.";
        return(0);
    }

As you can see, it pretty much sucks.

Or something similar to distinguish between languages. It reverts to guessing if <meta language="C++" /> isn't specified.

| |
\$\endgroup\$
  • \$\begingroup\$ @S.Mark That doesn't seem to work... \$\endgroup\$ – Mateen Ulhaq Apr 29 '11 at 5:49
  • \$\begingroup\$ sorry, its only works on Stack Overflow and meta, I don't know why. ref - meta.stackexchange.com/questions/981/… \$\endgroup\$ – YOU Apr 29 '11 at 5:58

You must log in to answer this question.

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