[Pmwiki-users] how to add a syntaxe highlighter ?

Patrick R. Michaud pmichaud
Mon Aug 4 22:12:02 CDT 2003


The $DoubleBrackets patterns are only applied to the markup text
one line at a time, so it won't match across multiple lines.  
I can probably come up with a way to do it but I don't have anything
handy at the moment (sorry).  In a future version of PmWiki there's
likely to be an array or way to process things in the markup text
before any other formatting or splitting is performed.

Pm

   
On Sun, Aug 03, 2003 at 12:55:28AM +0200, garfield_fr wrote:
> I have a function :
> 
> function FormatPhp($text){
>     return highlight_string($text);
> }
> 
> and I want to hightlight a code write in a page ...
> 
> by exemple the source in wikipage is :
> 
> !!This is a source code in PHP
> 
> [[php
> <?php
> function AFunctionInPHP($param){
> }
> 
> ?>]]
> 
> (end)
> where [[php ... ]] is the markup of php code source.
>  I set :
> $DoubleBrackets['/\[\[php ([.*\n]*?)]]/e'] = 'FormatPhp("$1");';
> 
> but it does'nt work ...how I do it ???
> 
> Eric (aka GarfieldFR)
> webmaster at codedb.fr.st
> http://www.codedb.fr.st
> (sorry for my poor english)
> 
> _______________________________________________
> Pmwiki-users mailing list
> Pmwiki-users at pmichaud.com
> http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com



More information about the pmwiki-users mailing list