Skip to main content
16 events
when toggle format what by license comment
Oct 7, 2020 at 17:32 comment added Josh Goebel @Greedo Can you tell me in what contexts VBScript (vs VBA or VB.net) is still alive and being used today?
Sep 29, 2020 at 16:40 comment added Greedo Basically what I mean is, if SO relies on highlight.js auto-detection, then using vbnet (or vba) to highlight all the vb family, will result in some false negatives, eg. where code is valid in VBA but not VB.Net. VBScript is the most lenient in syntax, because it has the least of it (and thus does a poor job highlighting VBA and VB.Net, but a good job detecting them). If SO doesn't need autodetection much then this is a non issue and the most keyword rich vbnet is certainly superior as a catch-all (ofc all 3 individual highlighters would be most optimal)
Sep 29, 2020 at 16:30 comment added Greedo @BenKelly One consideration after looking at the highlight files for the different languages (vbscript, vba, vbnet) is the latter two contain "illegal" attributes such as '//|{|}|endif|gosub|variant|wend|^\\$ ', /* reserved deprecated keywords */ in vbnet. I believe these illegal attributes only affect default highlighting by telling the language recogniser to bail early if it finds wend - since that couldn't possibly match Vb.Net - but of course wend is valid in VBA/VbScript. IIUC SO tags override default, so will matter? Some valid VBA is never auto-detected essentially
Sep 28, 2020 at 21:03 comment added Ben Kelly StaffMod @GSerg I've taken your comments into consideration and I've decided to switch the syntax highlighter from vbscript to vbnet instead. There's no specific reason it was vbscript to start, just that's what I chose. In hindsight, vbnet is the obvious choice. Thanks for bringing this up! The change should go live sometime tomorrow.
Sep 26, 2020 at 6:52 comment added GSerg @BenKelly That is not surprising really because vbscript does not have As in the first place. It also does not have other things, which I assume will then also not be highlighted. Arguably, out of the VBA, VB.NET and VBScript, the latter is the least good candidate for representing the other two. It is certainly a step back for all three then :(
Sep 25, 2020 at 20:11 comment added Ben Kelly StaffMod @GSerg Thank you for the update. The As not getting highlighted is a shortcoming of highlight.js's language definitions for vbscript. As for the colors, what item should be what color is left to the theme. Part of the highlight.js rollout was a new theme, which might be causing the confusion
Sep 25, 2020 at 20:05 comment added GSerg @BenKelly Anything, really? E.g. stackoverflow.com/q/64017640/11683. The type declarations (As String) should be blue, including the As. String literals should not be green. True and False should be blue.
Sep 25, 2020 at 20:00 comment added Ben Kelly StaffMod @GSerg Do you have an example post you're looking at that I can use to reproduce what you're seeing?
Sep 25, 2020 at 19:53 comment added GSerg @BenKelly Thank you. However, the current highlight does not look like VB to me at all :(
Sep 25, 2020 at 19:44 comment added Ben Kelly StaffMod vb and vbs now will set the language to vbscript. I had somehow missed aliases for literally just these two languages :facepalm:. Must be some sort of repression mechanism from the first half of my career writing primarily in VB.Net ;). vbnet and vba (not being supported aliases) will result in the code autohighlighting instead.
Sep 25, 2020 at 19:42 history edited Ben KellyStaffMod CC BY-SA 4.0
added 3 characters in body
Sep 25, 2020 at 15:05 history edited Ben KellyStaffMod CC BY-SA 4.0
added 23 characters in body
Sep 25, 2020 at 15:05 comment added Ben Kelly StaffMod Thanks for the report. I may have missed a language alias here. I'll double check and get the changes into my first round of fixes going out today.
Sep 24, 2020 at 21:37 comment added Greedo Interestingly vbs, vb, vbnet as tags for code fences all result in some kind of default highlighting that some gibberish tag dfbdfkbk also produces, as if they aren't recognised - however vba suppresses highlighting altogether, so slightly different
Sep 24, 2020 at 21:33 comment added Greedo Seems VBA, VB.Net and VBScript all affected, even though all 3 are uniquely supported in highlight.js (unlike prettify, where I thing VBA just mapped to one of the other two)
Sep 24, 2020 at 18:33 history answered GSerg CC BY-SA 4.0