Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43601 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38460 invoked from network); 2 Apr 2009 16:23:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Apr 2009 16:23:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=kalle.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kalle.php@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.172 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: kalle.php@gmail.com X-Host-Fingerprint: 209.85.220.172 mail-fx0-f172.google.com Received: from [209.85.220.172] ([209.85.220.172:48989] helo=mail-fx0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 30/C3-22853-776E4D94 for ; Thu, 02 Apr 2009 11:23:20 -0500 Received: by fxm20 with SMTP id 20so615323fxm.23 for ; Thu, 02 Apr 2009 09:23:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=KeSnRxIAsm6Gz/6npe/ec/WdKV0AlT70pBMqsWCgtB0=; b=w+aJpmiDSsAcwddjVJdfJrdmw0DuxzAEnF5lTxHG/1IX7Zg3AV1crrt2diK9EzneNF hCsB3Ju6xPnYsCNWWzXLjE++yQfDD1CySCPpVl4RwU3KlMlER7GjvUtDzQY3YOUStAQG kk0d6A2w2VkB2SHxtiRUIPokzcDRpOyWwzLg8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=Erh2OyNJJG06ypjHVdmY2e3+rBXpzBoYrK1rmtwKeUl/f4HCuXgdkfjt9ZNoIeiHDR mJoW5pm6WH3DKiwwyArVXtewVmyg7BeZKoRNDznSbClKSzlwXXNDQbjLDn0kIuSUlkbe 2NqgAD6l2E5MqQlG1yijk7NrME7WnhIsdbQAM= MIME-Version: 1.0 Sender: kalle.php@gmail.com Received: by 10.86.51.10 with SMTP id y10mr294918fgy.9.1238689396740; Thu, 02 Apr 2009 09:23:16 -0700 (PDT) In-Reply-To: References: <6F.F0.47115.84534D94@pb1.pair.com> <2dedb8a0904020508r6306c189peda001421d4e830f@mail.gmail.com> <2dedb8a0904020515k6bd68cdarea0ebd9bb3a8f6c9@mail.gmail.com> <49D4CE5F.3070805@php.net> <2dedb8a0904020745gf2d9e19wd0f1167dae53ac2d@mail.gmail.com> <1238684543.8765.141.camel@localhost> Date: Thu, 2 Apr 2009 18:23:16 +0200 X-Google-Sender-Auth: cefe126d43821550 Message-ID: <2dedb8a0904020923o6b6ed396y85c8ef93ab9f7611@mail.gmail.com> To: Chris Stockton Cc: Robert Cummings , Scott MacVicar , David Coallier , Justin Martin , internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Update to Zend Highlighter From: kalle@php.net (Kalle Sommer Nielsen) Hi Chris 2009/4/2 Chris Stockton : > On Thu, Apr 2, 2009 at 8:02 AM, Robert Cummings wr= ote: >> >> Wrap the whole =A0highlighted block in a div with a class: >> >> =A0 =A0
>> =A0 =A0
>> >> 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, and would further elaborate instead of INI changes etc, > allow a key-value pair array to be passed as a third argument. Perhaps > ini changes could be the "default" names. > > mixed highlight_file (string $filename [, bool $return=3D false [, array > $class_names]]); > > comment|default|keyword|html|string) > > Array( > =A0 =A0'div_wrapper' =3D> 'xyz-cms-div-wrapper', > =A0 =A0'default' =3D> 'xyz-cms-default', > =A0 =A0'etc' =3D> 'xyz-cms-etc', > ); > > The good thing about this as well, is for some odd or logical reason > if your using highlighting multiple times, you can change the class > names of each highlight without something like ini_set. I must honest, I don't really like this approach (passing an array with class names), I think INI calls are better, or even better if we wrap it all into a "Highlight" class which could make the API alot easier not only for classes, but also inline colors and perhaps even more options later on. > > -Chris > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 Kalle Sommer Nielsen kalle@php.net