php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47201 use an external highlight source-code engine
Submitted: 2009-01-23 15:08 UTC Modified: 2010-08-27 18:17 UTC
From: pear at laurent-laville dot org Assigned: cweiske (profile)
Status: Closed Package: Doc Build problem
PHP Version: 0.4.3 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
40 + 2 = ?
Subscribe to this entry?

 
 [2009-01-23 15:08 UTC] pear at laurent-laville dot org
Description:
------------
This is not a BUG, just a REQUEST to use an external 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 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-23 23:41 UTC] bjori@php.net
You mean at the theme level?
That is already possible by providing your own programlisting/CDATA functions..
 [2009-01-24 09:20 UTC] pear at laurent-laville dot org
Hannes,

I've looked inside PhD code (themes handling), and I don't see how to do.

Perharps you can explain me more. 
What do you mean by "using my own programlisting/CDATA functions" ?

Related to my external guide, link [3], the corresponding docbook source code in peardoc repository is 

http://cvs.php.net/viewvc.cgi/peardoc/en/package/html/html-quickform-advmultiselect/firstform.xml?view=log

As you can see, line 33 and +, I used only a standard way

<programlisting role="php">
 <![CDATA[
<?php

...

?>
 ]]>
</programlisting>
 [2009-01-25 20:02 UTC] cweiske@php.net
Fixed in version 0.4.4. You can specify an own highlighting class with --highlighter/-h

See a dummy geshi highlighter:
http://tmp.cweiske.de/PhD_Highlighter_Geshi.phps

One would put it into PhD/Highlighter/Geshi.php, so that it is in the include path, and specify "-h PhD_Highlighter_Geshi" to phd on cmdline.
 [2009-01-26 12:40 UTC] cweiske@php.net
documentation needed
 [2010-08-27 11:07 UTC] cweiske@php.net
Automatic comment from SVN on behalf of cweiske
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=302846
Log: Write about writing own source code highlighters. This fixes bug #47201: use an external highlight source-code engine
 [2010-08-27 18:17 UTC] cweiske@php.net
-Status: To be documented +Status: Closed
 [2010-08-27 18:17 UTC] cweiske@php.net
fixed in svn.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 10:01:28 2024 UTC