Last post Jan 29, 2014 04:50 PM by tmorton
Apr 27, 2013 01:17 PM|smirnov|LINK
There is some little issue with highlighting a code which has comments in it
1. command.Connection = connection
2. 'Put values here to change then
3. command.Parameters.AddWithValue("@field1Name", TextBox1.Text)
1st line is correct but 3rd and all following lines highlighted as comments.
More examples: http://forums.asp.net/t/1901951.aspx
Apr 27, 2013 01:28 PM|oned_gk|LINK
Apr 30, 2013 03:01 AM|vinz|LINK
Seems like this issue is only applicable in VB.NET codes. I did a quick test
here and it looks good in C# and HTML.
Apr 30, 2013 09:26 AM|vinz|LINK
i use 'comment' to stop comment
But that would look like a string value. The forecolor still looks red instead of green. :)
Apr 30, 2013 09:42 AM|tmorton|LINK
Thanks for the report. We are using Google Code Prettify for syntax highlighting, and it looks like they have had a release in February 2013 which may help with this issue. I've now backlogged this work and we take a look at it in the coming weeks.
Apr 30, 2013 09:45 AM|tmorton|LINK
I should have added that the problem seems to be the auto-detection of VB. If you edit the HTML of your post and specify the language in the <pre> tag, the highlighting works as expected:
<pre class="prettyprint lang-vb">
But we are trying to stay away from people having to specify the code language, as this just makes things all around more complicated.
Jan 29, 2014 04:50 PM|tmorton|LINK
There still has not been any improvement in Google Code Prettify's VB.NET auto-detection, so we deployed 2 updates to the forums today which should help:
If you are posting VB.NET code, I highly suggest choosing "VB.NET" from the language dropdown in the Insert Code window. Also, click Preview to toggle a preview of the post you are creating, to see what it will look like after you post it.