[Pmwiki-users] PHP Syntax Highlighting?
Ciaran
ciaranj
Mon Jul 26 02:55:29 CDT 2004
Try this from the cookbook :
http://www.pmwiki.org/wiki/Cookbook/Beautifier
It works a treat for many many languages, but I've not tested it with
php code :)
-Ciaran
On Mon, 26 Jul 2004 10:39:11 +0200, Thomas Werner <fnord at holychao.de> wrote:
> Hello ML,
>
> I thought it would be a very great feature if
> php-sourcecode was automatically syntax-highlighted
> by the wiki.
> So I tried something like:
>
> $InlineReplacements['/<\?php(.*)\?>/se'] = "php2wiki('$1')";
>
> function php2wiki($txt) {
> return highlight_string( html_entity_decode (
> stripslashes($txt) ),true);
> }
>
> It works great on single lines, but not multiline.
> Then I noticed, $InlineReplacements gets single lines
> only, so this solution won't ever work.
> How can I achieve automatic php syntax highglighting?
> Is it possible without changing phpwiki.php just by
> adding some script to scripts/ directory like I tried above?
>
> Thomas
>
> --
> Pmwiki-users mailing list
> Pmwiki-users at pmichaud.com
> http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com
>
--
- Ciaran
http://www.wombatinvasion.com/ (Share the love)
More information about the pmwiki-users
mailing list