Re: [PEPr] +1 for Text::Text_Highlighter
| From: | Bertrand Mansion | Date: | Thu, 20 May 2004 12:15:36 +0000 |
| Subject: | Re: [PEPr] +1 for Text::Text_Highlighter | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-29438@lists.php.net to get a copy of this message | ||
PEPr wrote:
>
> Bertrand Mansion (http://pear.php.net/user/mansion) has voted +1 on the
> proposal for Text::Text_Highlighter.
>
> Proposal information:
> http://pear.php.net/pepr/pepr-proposal-show.php?id=72
> Vote information:
>
> http://pear.php.net/pepr/pepr-vote-show.php?id=72&handle=mansion
>
> This vote is conditional. The condition is:
>
> IMO, Some things still need to be fixed:
>
> - If end attribute is empty (end=""), generator says: Uninitialized string
> offset: 0 in /usr/lib/php/Text/Highlighter/Generator.php on line 242
>
> - undefined variable index line 63 (in generate tool) on every run
>
> - I also had some undefined index defcolor line 240 and 420 but I don't
> remember how (sorry...)
>
> - In js highlighter, I think case should be set to "no"
>
> - I still get <ol> tags in the result when using numbers=true, beside the new
> table with the numbers, that makes 2 cols of numbers (a bit too much ;) )
>
> Otherwise, it is working great, my Objective-C highlighter is ready.
I forgot one thing:
bandwidth wise, it could be interesting to have the possibility to set the color
of an token to null, for example with 'identifier' in JS highlighter, because
the technique used to find keywords is done through the use of 'identifier' and
the associated regex.
This can create a lot of <span class="identifier"> when all you need is the
holder to find the keywords later on. So I suggest that if an class attribute is
not set, then the span tag is not in the final output: reduces file size.
And one more thing:
I noticed the attributes for color are called :innerColor, etc.
In the resulting html, they are called "class" and used in the span. Might be
better to call them directly 'innerClass'.
Bertrand Mansion
Mamasam