ID:               45455
 Updated by:       [EMAIL PROTECTED]
 Reported By:      ceo at l-i-e dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Feature/Change Request
 Operating System: N/A
 PHP Version:      5.2.6
 New Comment:

highlight_file is a small helper and not meant to be a full-features
highlighter.

Instead of parsing the output you might also read the file (using
file(), file_Get_contents() or so and then use highlight_string() on
some chunks of it.


Previous Comments:
------------------------------------------------------------------------

[2008-07-08 13:45:09] ceo at l-i-e dot com

Description:
------------
I would find highlight_file much more useful, particularly for writing
on-line tutorials, articles, etc if it would take a line number and
count optional arguments, to print out only an excerpt of the file.

One could then intersperse bits of code and commentary very easily with
original source files instead of having to keep code snippets in sync as
you develop/author an article.

One can, of course, play games with explode("<br />" and array_slice,
but it's a bit of a pain, really.

It would also be extra nifty if line numbers could be added on the left
with yet another optional arg, and maybe even an arg for
absolute|relative numbering for the snippets.

PHP Rocks!




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45455&edit=1

Reply via email to