Re: [PHP-DEV] Update to Zend Highlighter

2009-04-07 Thread Lukas Kahwe Smith
On 02.04.2009, at 19:33, Johannes Schlüter wrote: Hi, On Wed, 2009-04-01 at 20:47 -0700, Justin Martin wrote: The update I'd like to propose is to the Zend Highlighter for PHP, specifically related to the highlight_file and highlight_string functions, as well as the php -s command. I don't

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Kalle Sommer Nielsen
2009/4/2 Justin Martin : > Hello everyone, > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > Just as an update, I reviewed my previous patch and re did it (attached). Instead of adding the highlight.class_* INI entries, this simp

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Justin Martin
I do like using the same INI setting name which depends on the use_external_styles setting. However, no stylesheet should be automatically included. The highlight functions do not produce a whole page, except in the case of a .phps (PHP Source file). It should be up to the user to manage how they

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Davey Shafik
Why not just re-use the same highlight.*, they can be colors or classes... or you switch this based on "highlight.use_external_styles". You could also add a: "highlight.add_stylesheet" to add a default stylesheet created by PHP... - Davey Lewis Wright wrote: Why not allow a class prefix

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Justin Martin
I'm really liking the INI idea, including setting the default class names for each element. However, I think it would be nice to have an optional parameter to the functions to allow call-specific settings for such things. This way, one can highlight their code in different ways, in different contex

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Robert Cummings
On Thu, 2009-04-02 at 17:38 +0100, Lewis Wright wrote: > Why not allow a class prefix as an option to the function? > > Eg: > > 'php-highlighted-' as the prefix would produce things like > 'php-highlighted-keyword'. > > That way there's no risk of collision and there's no need to > over-complica

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Johannes Schlüter
Hi, On Wed, 2009-04-01 at 20:47 -0700, Justin Martin wrote: > The update I'd like to propose is to the Zend Highlighter for PHP, > specifically related to the highlight_file and highlight_string > functions, as well as the php -s command. I don't see the need for a rush (or in other words: 5.3 ca

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Lewis Wright
Why not allow a class prefix as an option to the function? Eg: 'php-highlighted-' as the prefix would produce things like 'php-highlighted-keyword'. That way there's no risk of collision and there's no need to over-complicated things. 2009/4/2 Robert Cummings : > On Thu, 2009-04-02 at 09:13 -07

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Robert Cummings
On Thu, 2009-04-02 at 09:13 -0700, Chris Stockton wrote: > On Thu, Apr 2, 2009 at 8:02 AM, Robert Cummings wrote: > > > > Wrap the whole highlighted block in a div with a class: > > > > > > > > > > Add one more INI setting to change that class. Let users leverage > > hierarchical CSS rule

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Kalle Sommer Nielsen
Hi Chris 2009/4/2 Chris Stockton : > On Thu, Apr 2, 2009 at 8:02 AM, Robert Cummings wrote: >> >> Wrap the whole  highlighted block in a div with a class: >> >>     >>     >> >> Add one more INI setting to change that class. Let users leverage >> hierarchical CSS rules: >> >> div.php-highlighted-

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Chris Stockton
On Thu, Apr 2, 2009 at 8:02 AM, Robert Cummings wrote: > > Wrap the whole  highlighted block in a div with a class: > >     >     > > Add one more INI setting to change that class. Let users leverage > hierarchical CSS rules: > > div.php-highlighted-code span.keyword { color: red; } I like that,

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Robert Cummings
On Thu, 2009-04-02 at 16:45 +0200, Kalle Sommer Nielsen wrote: > Hi Scott > > 2009/4/2 Scott MacVicar : > > David Coallier wrote: > >> 2009/4/2 Kalle Sommer Nielsen : > >>> 2009/4/2 Kalle Sommer Nielsen : > Hi Justin > > >>> Attached a patch instead, hopefully this will work ;) > >>> > >

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Kalle Sommer Nielsen
Hi Scott 2009/4/2 Scott MacVicar : > David Coallier wrote: >> 2009/4/2 Kalle Sommer Nielsen : >>> 2009/4/2 Kalle Sommer Nielsen : Hi Justin >>> Attached a patch instead, hopefully this will work ;) >>> >>> >> >> >> I really do like this idea :) Let's just commit it. > > Hold your horses,

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Kalle Sommer Nielsen
Hi David 2009/4/2 David Coallier : > 2009/4/2 Kalle Sommer Nielsen : >> 2009/4/2 Kalle Sommer Nielsen : >>> Hi Justin >>> >> >> Attached a patch instead, hopefully this will work ;) >> >> > > > I really do like this idea :) Let's just commit it. > > I would however like ot see the "naming" stuctur

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Scott MacVicar
David Coallier wrote: > 2009/4/2 Kalle Sommer Nielsen : >> 2009/4/2 Kalle Sommer Nielsen : >>> 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 f

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Robert Cummings
On Thu, 2009-04-02 at 15:36 +0100, David Coallier wrote: > > Also I guess we'll have to attach a css file with that? Inline css at > the top of the generated highlighted block maybe? I thought the purpose was to allow external styling? Cheers, Rob. -- http://www.interjinn.com Application and Te

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread David Coallier
2009/4/2 Kalle Sommer Nielsen : > 2009/4/2 Kalle Sommer Nielsen : >> Hi Justin >> > > Attached a patch instead, hopefully this will work ;) > > I really do like this idea :) Let's just commit it. I would however like ot see the "naming" stucture Justin used in the first example by prefixing the

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Kalle Sommer Nielsen
2009/4/2 Kalle Sommer Nielsen : > Hi Justin > Attached a patch instead, hopefully this will work ;) -- Kalle Sommer Nielsen ka...@php.net Index: ZendEngine2/zend_highlight.c === RCS file: /repository/ZendEngine2/zend_highlight.c,v

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Kalle Sommer Nielsen
Hi Justin 2009/4/2 Justin Martin : > Hello everyone, > > I'd like to propose a very small update, which would have no > backwards-compatibility problems, and would bring PHP closer to > standards compliance. inline styles are standards compliant, but I know what you mean, inline styles aren't alw

Re: [PHP-DEV] Update to Zend Highlighter

2009-04-02 Thread Hannes Magnusson
2009/4/2 Justin Martin : > My proposal is a very simple one, which would add a third parameter, > which would be optional, which would select between "inline" styling, > and external styling. The proposed syntax for highlight_file would be: +1 :) -Hannes -- PHP Internals - PHP Runtime Developme