Jump to content

[Suggestion] Different code syntax in code tag


Kav

Recommended Posts

Posted

Hi,

I have a suggestion. The code tag currently uses an arbitrary color scheme for code pasted in it. Would it be possible to use GeSHi or some other PHP library to add color syntax support for multiple programming languages? Then you could use

 for example. This might be useful for the more technical-oriented IPB forums out there.
Posted

We use prettify for syntax highlighting

http://code.google.com/p/google-code-prettify/

I'm not sure there would be any benefit from switching to a PHP library for syntax highlighting. If you are just looking to support more code syntaxes, there is a capability to do that already. You can download them at the URL I linked and upload them to your site at publicjs3rd_partyprettify

Posted

Hi, it doesn't seem to recognize the languages people use. How would I force it to parse a specific language for the

 tag? I added "lang-rb" to the <pre> class and it still ignores it.
Posted

I would recommend posting in the peer help forum for that (or I could move this topic for you). I haven't really played with customizing it too much myself, I just know it is possible to support other languages with prettify.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...