4
\$\begingroup\$

Would it be possible to use the same Syntax Highlighter that Wikipedia uses for VBScript

If it is possible we could probably use it for all flavors of VB (,, , etc.)

Right now we have this

Lame Syntax Highlighting for VBScript

and Wikipedia has this

Cool Syntax Highlighting for VBScript


WikiPedia uses SyntaxHighlight GeSHi

Answers that can only be answered by the Developers.

  • Is this a different Syntax Highlighting Engine?
  • Is it open source or similarly licensed?
  • Could it also be used for other Coding Languages?
  • Will it "Play Well" with the Stack Exchange?
\$\endgroup\$
  • \$\begingroup\$ I think the biggest problem is that GeSHi is written in PHP, while the current system assumes highlighting is done on the client side in JS. \$\endgroup\$ – svick Sep 16 '14 at 18:58
  • \$\begingroup\$ @svick I hadn't looked at it that closely yet, but being PHP means that it won't play nicely with Stack Exchange because I believe that Stack Exchange is ASP.NET, but I could be wrong. \$\endgroup\$ – Malachi Sep 16 '14 at 19:06
  • \$\begingroup\$ I am going to try and look into Forking the Code later and see what I can make of it, and if I can make a tester copy of a page that I can run my new version on. \$\endgroup\$ – Malachi Sep 16 '14 at 19:07
  • 1
    \$\begingroup\$ @Malachi looking at the url's I'd say SE is ASP.NET MVC. \$\endgroup\$ – Mathieu Guindon Sep 19 '14 at 17:46
  • \$\begingroup\$ I just need a sample page that I can hook the JS and CSS into I think. but I think I am going to work on the MineSweeper thing first.... \$\endgroup\$ – Malachi Sep 19 '14 at 17:48
4
\$\begingroup\$

As per the Stack Exchange syntax highlighting guide:

What is syntax highlighting and how does it work?

Stack Exchange does not have its own syntax highlighting engine. It uses Google Code Prettify. Therefore, any bugs and feature requests regarding syntax highlighting cannot be handled by Stack Exchange and should be directed to the team behind Google Code Prettify.

later, it says:

If your post doesn't have the correct highlighting, it's possible it's not supported. Please look at the list of supported languages. If your language is not on the list, it needs to be created within the Prettify project before it can be deployed by Stack Exchange. If a language that could be applied to a tag is already on the list, please raise a feature request here on Meta to have it deployed on the network.

\$\endgroup\$
  • \$\begingroup\$ VBScript is supported as VB, but looks like crap. Wiki already has nice code highlighting, my question is can we use that highlighting instead of Google Prettify? \$\endgroup\$ – Malachi Sep 16 '14 at 14:35
  • 2
    \$\begingroup\$ @Malachi D'oh, meant to respond to this a while back. But what rolfl said is right. A fair amount of work has gone into making Prettify our highlighting implementation, and I don't see us trying to figure out adding SyntaxHighlight GeSHi or anything else anytime soon. Your best bet is to get VBScript supported by Prettify independently of Visual Basic. \$\endgroup\$ – Pops Jan 8 '15 at 20:08
  • \$\begingroup\$ One of these days when I have the time I will look into it again. but thanks for the reply @Pops \$\endgroup\$ – Malachi Jan 8 '15 at 20:25
  • \$\begingroup\$ @Pops I submitted a Patch Request --> code.google.com/p/google-code-prettify/issues/… something simple though. \$\endgroup\$ – Malachi Jan 14 '15 at 20:37

You must log in to answer this question.

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