Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
Kav Posted March 21, 2012 Posted March 21, 2012 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.
bfarber Posted March 21, 2012 Posted March 21, 2012 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
Kav Posted March 22, 2012 Author Posted March 22, 2012 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.
bfarber Posted March 22, 2012 Posted March 22, 2012 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.