8

See this thread where I got this issue: Cannot add rows to DataTable from another thread.

And specifically my solution to it, where it says

_dt.Rows.RemoveAt(_dt.Rows.Count - 1)

In VB.NET rem denotes a comment, an equivalent of ', but it should do some syntax analysis, because not everything that comes after string rem is a comment.

7
  • 1
    Raise an issue for prettify. Commented Oct 24, 2012 at 18:46
  • 5
    @DanielFischer: As far as I got it, StackOverflow uses prettify for syntax highlight under the hood. If so, their devs probably have more weight on google-code than me, when submitting the issue - so higher chance it gets resolved quickly - and they get notified, cause it's them who ultimately will be replacing this component with newer version.
    – user199936
    Commented Oct 24, 2012 at 18:59
  • 2
    I'm taking a peek, it looks like this is fixed in the latest version of prettify here's ours and here's the latest to play with...looks like we need to update but need to see what if anything it breaks. Commented Oct 24, 2012 at 19:01
  • 1
    @NickCraver: Looks like the latest is not quite correct either. Rem Comment here! should be same color as 'Comment, and it's not.
    – user199936
    Commented Oct 24, 2012 at 19:07
  • @Neolisk, the trick for making it stop commenting everything after ' is to put <!-- language: lang-vb --> before the code. It's not properly recognizing the language, and is trying to find the closing quote
    – SeanC
    Commented Oct 31, 2012 at 18:24
  • @DanielFischer, code.google.com/p/google-code-prettify/issues/detail?id=254
    – SeanC
    Commented Oct 31, 2012 at 18:48
  • @SeanCheshire: thanks for a workaround - I honestly did not know about it. Also this <!-- language --> trick looks like something I need to remember - it's not in the editor's UI. It still does not resolve the issue with rem commenting until the end of line. But please go ahead and post it as an answer (since it resolved part of the problem for now). So if not completely resolved by end of bounty, you'll get half of it, plus my upvote.
    – user199936
    Commented Oct 31, 2012 at 19:37

3 Answers 3

2
+50

The trick for making it stop commenting everything after ' is to put <!-- language: lang-vb --> before the code. It's not properly recognizing the language, and is trying to find the closing quote

The issue is raised (but feel free to add comments): https://code.google.com/p/google-code-prettify/issues/detail?id=254

2
  • I left my upvote there. +1
    – user199936
    Commented Oct 31, 2012 at 19:40
  • Thanks for submitting this issue. (even though nobody looked at it yet at google code)
    – user199936
    Commented Nov 6, 2012 at 16:00
0

We have pulled in the latest prettify source including all of the plugins. The issue you have pointed out appears to be still present in the latest version of prettify.

3
  • Thanks for your effort. Guess not many care about VB.NET. Hope it gets fixed one day... :)
    – user199936
    Commented Oct 26, 2012 at 11:30
  • 1
    Has someone (preferably someone from SE) raised an issue for prettify about this?
    – MarkJ
    Commented Oct 26, 2012 at 12:33
  • @geoff , reported fixed: Fixed in r228 which will be included in a forthcoming release.
    – SeanC
    Commented Feb 28, 2013 at 13:10
0

Why don't Stackoverflow switch to use sunlight.js?

It seems to be well built and documented. Found here.

You must log in to answer this question.