Is it possible to include/define a custom highlight source-code engine ?
Standard PHP highlight source code functions [1] does not provided line
numbering, and its a regret (for me). I prefer to use GeSHi [2] that
give ability to build such result [3] extends to lot of language. Which
I consider better to follow a tutorial step by step.
Laurent Laville
[1] http://www.php.net/manual/en/function.highlight-file.php
http://www.php.net/manual/en/function.highlight-string.php
[2] http://qbnz.com/highlighter/
[3]
http://www.laurent-laville.org/pear/HTML_QuickForm_advmultiselect/docs/TDG/en/ch05.html
> Is it possible to include/define a custom highlight source-code engine ?
I think this is a decent feature request. Could you add it to the php.net bugtracker?
--
Regards/Mit freundlichen Grüßen
Christian Weiske
Very impatient to use it :)
Just check out branch phd_0_4 from cvs.
An example:
http://tmp.cweiske.de/package.console.console-commandline.creating-the-parser.html
It's nice Christian, and very impressive to implement this feature so
quickly, but ... sorry there is a but:
I found a problem when using different header type usage with Geshi. My
technical explains will follow offline soon. Just to let me finish my
last tests.
BTW, great job in a very frame time :)
Laurent
Got this working on phpdoc and peardoc (had to play around with the
name and locations a bit - probably the same issues as Laurent).
--
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"
Tiny little bug which only generates an issue in IE (tested in
IE/Chrome/Firefox) and CHM files where you cut and paste an example.
There are no newlines so the example code runs into 1 line.
Adding ...
$geshi->set_header_type(GESHI_HEADER_DIV);
solves this.
See http://bugs.php.net/bug.php?id=47242
Richard.