[ php-blog-Bugs-1593055 ] geshi plugin does not correctly pickup all language files

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.serendipity.trackers
Message-ID <[email protected]>
Bugs item #1593055, was opened at 2006-11-09 00:38
Message generated for change (Comment added) made by garvinhicking
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=542822&aid=1593055&group_id=75065

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Plugins
Group: None
>Status: Pending
>Resolution: Fixed
>Priority: 1
Private: No
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Garvin Hicking (garvinhicking)
Summary: geshi plugin does not correctly pickup all language files

Initial Comment:
Hi,
just recently when I wanted to use the geshi plugin
using the oracle8 language, I noticed, that the
highlighting did not work, although it should. 
The readme clearly states:
"For a list of supported languages and the language
name to use, look in the /geshi directory.  Each supported
language has a name.php file."
The problem is in the file serendipity_event_geshi.php,
it only looks for [a-zA-Z]*.php files and does not take
numbers into account.
Please use the following patch:
--- serendipity_event_geshi.php 2006-11-09
00:33:12.000000000 +0100
+++ serendipity_event_geshi.php.new     2006-11-09
01:19:10.000000000 +0100
@@ -130,7 +130,7 @@
     function geshi($input) {
         $pathtogeshi = $this->get_config('pathtogeshi');
         require_once($pathtogeshi . '/geshi.php');
+        $input =
preg_replace_callback('/\[geshi(?:\s)*lang=([A-Za-z0-9]+)(?:\s)*(ln=[YyNn])?\](.*?)\[\/geshi\]/si',
array(&$this, 'geshicallback'), $input);
-        $input =
preg_replace_callback('/\[geshi(?:\s)*lang=([A-Za-z]+)(?:\s)*(ln=[YyNn])?\](.*?)\[\/geshi\]/si',
array(&$this, 'geshicallback'), $input);
         return $input;
     }
For the record, i am using 1.0.2, and don't know
whether this is fixed in more recent versions.

With best regards,
Christian


----------------------------------------------------------------------

>Comment By: Garvin Hicking (garvinhicking)
Date: 2006-11-09 08:25

Message:
Logged In: YES 
user_id=473563

Hi!

Thanks a lot for reporting, though this bug had been fixed
in recent versions of the geshi plugin already. The latest
version is "0.5", available via Spartacus/CVS, since this
plugin is not bundled with Serendipity.

Best regards,
Garvin

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=542822&aid=1593055&group_id=75065

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.