Re: Update to Zend Highlighter
| From: | Robert Cummings | Date: | Thu, 02 Apr 2009 15:02:23 +0000 |
| Subject: | Re: Update to Zend Highlighter | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-43598@lists.php.net to get a copy of this message | ||
On Thu, 2009-04-02 at 16:45 +0200, Kalle Sommer Nielsen wrote:
> Hi Scott
>
> 2009/4/2 Scott MacVicar <scottmac@php.net>:
> > David Coallier wrote:
> >> 2009/4/2 Kalle Sommer Nielsen <kalle@php.net>:
> >>> 2009/4/2 Kalle Sommer Nielsen <kalle@php.net>:
> >>>> Hi Justin
> >>>>
> >>> Attached a patch instead, hopefully this will work ;)
> >>>
> >>>
> >>
> >>
> >> I really do like this idea :) Let's just commit it.
> >
> > Hold your horses, lets not commit things hastily. I'm not a huge fan of
> > adding 6 new INI settings and I think have another idea so we can avoid
> > this and still offer more flexibility.
>
> Sure 6 new INI settings sounds alot, but thinking about it theres
> already 6 to control the current (bg, default, comment, html, keyword
> & string) and 5 of these new ones is to control classes if theres a
> class naming conflict then a user can customize. So only one setting
> is needed to enable this feature.
>
> But if you have a better way around this then I'm all ears :)
Wrap the whole highlighted block in a div with a class:
<div class="php-highlighted-code">
</div>
Add one more INI setting to change that class. Let users leverage
hierarchical CSS rules:
div.php-highlighted-code span.keyword { color: red; }
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP