Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:5093 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78642 invoked by uid 1010); 30 Oct 2003 03:31:27 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 78618 invoked from network); 30 Oct 2003 03:31:26 -0000 Received: from unknown (HELO titanium.nocdirect.com) (66.227.56.6) by pb1.pair.com with SMTP; 30 Oct 2003 03:31:26 -0000 Received: from 66-65-38-11.nyc.rr.com ([66.65.38.11] helo=chiaraquartet.net) by titanium.nocdirect.com with asmtp (Exim 4.24) id 1AF3Wv-0003Mk-Sc; Wed, 29 Oct 2003 21:31:25 -0600 Message-ID: <3FA0861D.4070003@chiaraquartet.net> Date: Wed, 29 Oct 2003 22:31:41 -0500 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: lisa@gentoo.org CC: internals@lists.php.net References: <1067369954.17263.15.camel@lisa.thedoh.com> In-Reply-To: <1067369954.17263.15.camel@lisa.thedoh.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - titanium.nocdirect.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - chiaraquartet.net Subject: Re: [PATCH][ZE2] zend_highlight.c change From: greg@chiaraquartet.net (Greg Beaver) Lisa, With my testing,
\n causes a double line break in Netscape Mail and Internet Explorer 6 on windows. However, using \n inside
 
instead of 
works in both browsers. For my test, I took the page at http://pear.php.net/manual/en/core.pear.pear.seterrorhandling.php and replaced the
with \n. I've uploaded a copy to: http://www.chiaraquartet.net/test_br.html I would appreciate it if people with older versions of Netscape/IE, any version of Mozilla, Opera, Konqueror, etc. would take a look and speak up if the example doesn't work correctly. Regards, Greg Lisa Seelye wrote: > Attached is a patch to change the behavior of source highlighting > functions to use instead of . > This patch also introduces \n and \t when the parser encounters one > (this change is mainly for readability). > > The reasoning is: the tag is depreciated[1], and \n and \t should > be preserved, and not just translated into
and  's > (respectively). > > [1]: http://www.w3.org/TR/html4/present/graphics.html#edef-FONT > > Please CC me on replies. > > > ------------------------------------------------------------------------ > > --- cvs/ZendEngine2/zend_highlight.c 2003-08-11 01:24:41.000000000 -0400 > +++ cvs-diff/ZendEngine2/zend_highlight.c 2003-10-28 14:05:59.000000000 -0500 > @@ -30,7 +30,7 @@ > { > switch (c) { > case '\n': > - ZEND_PUTS("
"); > + ZEND_PUTS("
\n"); > break; > case '<': > ZEND_PUTS("<"); > @@ -45,7 +45,7 @@ > ZEND_PUTS(" "); > break; > case '\t': > - ZEND_PUTS("    "); > + ZEND_PUTS("    \t"); > break; > default: > ZEND_PUTC(c); > @@ -104,8 +104,8 @@ > char *next_color; > int in_string=0; > > - zend_printf(""); > - zend_printf("\n", last_color); > + zend_printf("\n"); > + zend_printf("\n", last_color); > /* highlight stuff coming back from zendlex() */ > token.type = 0; > while ((token_type=lex_scan(&token TSRMLS_CC))) { > @@ -151,11 +151,11 @@ > > if (last_color != next_color) { > if (last_color != syntax_highlighter_ini->highlight_html) { > - zend_printf(""); > + zend_printf("
"); > } > last_color = next_color; > if (last_color != syntax_highlighter_ini->highlight_html) { > - zend_printf("", last_color); > + zend_printf("", last_color); > } > } > switch (token_type) { > @@ -192,10 +192,10 @@ > token.type = 0; > } > if (last_color != syntax_highlighter_ini->highlight_html) { > - zend_printf("\n"); > + zend_printf("\n"); > } > - zend_printf("\n"); > - zend_printf(""); > + zend_printf("\n"); > + zend_printf("\n"); > } > > > @@ -264,4 +264,3 @@ > * indent-tabs-mode: t > * End: > */ > -