[ 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-08 16:38
Message generated for change (Comment added) made by sf-robot
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: Closed
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: SourceForge Robot (sf-robot)
Date: 2006-11-23 19:20
Message:
Logged In: YES
user_id=1312539
Originator: NO
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
----------------------------------------------------------------------
Comment By: Garvin Hicking (garvinhicking)
Date: 2006-11-09 00: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
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV