[Pmwiki-users] Re: Highlighting <?php?

J. Perkins jason
Mon Mar 8 18:56:39 CST 2004


David Jackson wrote:
> I then looked about for other languge functions & remembered the 
> Beautifier Cookbook module.
> 
> I have installed that now instead, but added the above code to the end 
> of the function highlight_text in core.php:
> 
> (snip)
> 
> This removes the evil font tag :-)

I have added a CSS generator (actually there was one there already, it
just wasn't easily accessible). Get the latest version, then add the line:

   $BeautifierOutputType = 'css';

to your config.php and you will have proper CSS selectors. See the
Cookbook page for more information.


> While I'm on, anyone any idea why the beautifier ignores the quote 
> string colour?  I edited the appropiate HFile, added a new colour 
> ("red") to the array, changed the line

If you look at Output/Output_HTML.php, you'll see that those colors are
completely ignored. I don't know why Mike did this. I emailed him quite
some time ago about this and other issues but never heard back. The CSS
generator mentioned above does not have this problem.


> For completeness, I should also mention that I changed the markup to:
> 
> =code sql [=
> /* code Here */
>  =]
> 
> to save typing ;-)
> 
> Perhaps
> 
> =lang [=
> [..]
>  =]
> 
> would be beter...

I have changed it to =lang (as in, "=csharp"). The old markup still
works as well.

Jason







More information about the pmwiki-users mailing list