You are here

Geshi show more code

Submitted by devblog on Thu, 04/03/2010 - 10:14

Geshifilter is a Drupal module that displays syntax highlighted source code, and it is necessary for any blog that aims to shows source code to its readers. It is based on the Geshi Library which supports dozens of languages only six of which you've heard of.
It there is a flaw, if it could be truthfully described as such, it displays all the code you paste into your article and a long piece of source code breaks the flow of your article's narrative. I like to able to copy and paste source code from my websites, rather than fish around somewhere in the filesystem for the file, but still be able read the commentary surrounding the source. It comes in useful when you have to copy the whole asterisk.conf with all the explanatory comments, but still have a page you can easily read.

As ever you can depend on the Drupal community to come to the rescue.

There is a patch created by soxofaan and libeco which display a about 2 inches of the source and presents a link to expand the whole source, an example of which you can see in this article.

A recent addition is a small change which allows you to set whether the article should be shortened or not, useful for small snippets of code, right at the bottom of the thread.

I appear to be the only additional subscriber to the thread. Am I the only one who knows about it?

Add new comment