Re: [PEPr] +1 for Text::Text_Highlight
| From: | Richard York | Date: | Wed, 14 Apr 2004 05:27:59 +0000 |
| Subject: | Re: [PEPr] +1 for Text::Text_Highlight | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-27610@lists.php.net to get a copy of this message | ||
Greg Beaver wrote:
I am a big -1 for a package that can only do HTML syntax highlighting. That would be completely useless to phpDocumentor, and would be a package replacement for a 1-liner: highlight_string(). highlight_string() will be using CSS if it doesn't already, I remember commits to do this a month ago or more. if Text_Highlight is designed to do the abstract portion of highlighting (identifying related tokens and coloring them/doing xref links), then it is appropriately named.The name I suggested came about as I thought the HTML category represents packages that are largely focused on using HTML to construct output. I didn't think that the HTML category implied what the package does, though I can see that being a problem. Perhaps a tokenizer category would be more appropriate? Like Tokenizer_SyntaxHighlight, since all it does is highlight tokens. I dunno, doesn't matter to me really as long as the name is more suggestive of what it does. I guess the tools and utilities category could also be an appropriate place. A bit OT, since we're currently discussing the package name, but I also think this class should perhaps use external configuration files for the various tokens instead of defining arrays in the various classes. Such as the CSS property catalog could be represented in a plain text file listing a single property per line. Same for the XHTML class. This could allow a further level of dynamic ability. Regards, Richard York -- ::::::::::::::::::::::::::::::::::::::::: The Spicy Peanut Project http://www.spicypeanut.net :::::::::::::::::::::::::::::::::::::::::