Re: [PEPr] Comment on Text::Text_Highlighter

From: Date: Fri, 14 May 2004 22:10:07 +0000
Subject: Re: [PEPr] Comment on Text::Text_Highlighter
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-29250@lists.php.net to get a copy of this message
Bertrand Mansion (http://pear.php.net/user/mansion) has commented on the proposal for Text::Text_Highlighter. Comment: Very cool stuff ! A few comments : - The generated code has weird (MS-DOS ?) line endings. You might want to encode your Generator.php file to use Unix line feeds. - CS: use spaces before and after =, ==, commas, ?, :, etc. - A few notices: toplevel is undeclared, undefined index for never-contained and contains-all in the generator. - You might want to make the generator a CLI tool so that it is easier to use. Have a look at my Console_Getargs package for the options - Rendering: I don't like the generated HTML very much. Using <font> tags is outdated. You might consider to use an external renderer (see HTML_Menu for example) and use <span> with a css is certainly better solution. I suggest you have a look at how Horde is handling the line numbers in Chora (see cvs.php.net for examples). The problem with using <li> is that they will be selected when user want to copy/paste code. Also remember that a lot of users use <pre> to display code.
<snip /> I do agree on the use of <font> being bad, kill it. Use <span> and CSS classes, allows the user to completely change the colours even post-generation. A great thing if you move the results of the highlighting to a different background colour furhter on down the road. - Davey

« previous php.pear.dev (#29250) next »