Looking at my answer to this question:

Note: Language hint is correctly applied, so syntax highlighter should know it is exactly VB.NET.

Here is how it looks on StackOverflow:

enter image description here

And this is how it looks in Visual Studio 2013 (please ignore vertical bars):

enter image description here

I think VB syntax highlighter should be brought up to date with today's standards.

  • 1
    I think this might be a Google Prettify issue and not Stack Overflow, but someone with more experienced with how the syntax highlighting works might be able to say for certain. – psubsee2003 Dec 29 '13 at 18:01
  • Just curious: are you saying you don't have to quote the XML as some String value anymore? (Or is Visual Studio just not showing it anymore?) – Arjan Dec 29 '13 at 18:01
  • @Arjan: Not anymore, now just a direct paste from the XML file. It also gets indented automatically. And you can paste back without any modifications. – Neolisk Dec 29 '13 at 18:02
  • 1
    @Neolisk given that tidbit, I'd almost guarantee this is not an SO issue, but a Prettify issue then. Prettify is highlighting the xml like it would any other code since it doesn't know any better. Check out What is syntax highlighting and how does it work? – psubsee2003 Dec 29 '13 at 18:06
  • Did you ever peek into the actual source files, to see if there are really no quotes there? (As you're mentioning the auto-formatting and "you can paste back without any modifications", I wonder what magic is done in Visual Studio, which might hide the actual source code details from you. Though such magic is common in IDEs, and though Visual Studio might be the only real IDE for VB.net, I'd argue that we'd then not want the same magic on Stack Overflow.) – Arjan Dec 29 '13 at 18:15
  • @Arjan: Yes, the actual source code looks like the above. You can copy from notepad same way as you would from within Visual Studio. Check this out: snag.gy/g8pJv.jpg. – Neolisk Dec 29 '13 at 18:21
  • @Arjan in my experience the actual code files in Visual Studio (for all .NET languages) look exactly like they show up in the compiler. It isn't until they get compiled to IL do the "compiler tricks" get converted to something more meaningful. – psubsee2003 Dec 29 '13 at 18:22
  • Thanks. I was triggered by the formatting (where whitespace might matter in XML, hence I'd hate automatic formatting) and the "without any modifications" which made me think one would get back the unformatted thing one pasted earlier, but I guess I misunderstood that. All said, @psubsee2003 is right: it's a Google Prettify thingy. – Arjan Dec 29 '13 at 18:27
  • @Arjan: Considering that Prettify does not differentiate VB from VB.NET, although the two have a very different syntax, it probably won't get fixed too soon. Another thing is that a syntax file is like half a page of code, so we just spent more time discussing it than it would take an experienced developer to fix it. Finally, StackOverflow team is making big money on their website, and Google Prettify is free. Having said all of that, I think it would be fair if SO allocated an hour of one dev's time to fix this issue. Or research an alternative. – Neolisk Dec 29 '13 at 18:41
  • 1
    @Neolisk if you want to propose a feature for SO to change syntax-highlighters, go for it. Prettify obviously has its shortcomings, but just mentioning it in a comment likely won't get a lot of attention. – psubsee2003 Dec 29 '13 at 18:49
  • Any source for "StackOverflow team is making big money on their website"? (Apart from VC money.) – Arjan Dec 29 '13 at 20:08
  • @Arjan: Being in top 10 google results usually = big money. Aside from that, they have a dedicated team stackexchange.com/about/team, which obviously don't work for free. Also this - look at the benefits. Only top paying (read: top making) companies can afford that. Also look at these pictures. The company I work for was recently sold for ~2B$ and we don't have these goodies. In any case, it's infinitely more than Prettify, because their income is 0$. – Neolisk Dec 29 '13 at 20:25
  • Sure, VC money is being spent (though the benefits and all are not extraordinary, I feel). But I don't know if they could already do without those investments. (See also: How much money does Stack Exchange make?) – Arjan Dec 29 '13 at 20:37
  • @Arjan: Here is some source of their [estimated] daily income, accounting for ads only (but it is probably their major source anyway) - websiteoutlook.com/www.stackoverflow.com Quote: making USD 58931.02 daily, that's 21.5M a year. Prettify can't compare. – Neolisk Dec 29 '13 at 20:58
  • Sounds like a nice answer for the question I linked in my previous comment! – Arjan Dec 30 '13 at 17:46

Browse other questions tagged .