Re: phps line numbering

From: Date: Mon, 20 Nov 2006 22:21:49 +0000
Subject: Re: phps line numbering
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-26686@lists.php.net to get a copy of this message
Hi, the approached I used in my initial implementation works with most browsers fine (IE 6, IE 7, Konqueror) There's just one rarely used Browser, called Firefox (and it's friends), where it won't work. Firefox <=1.5 adds an # in front of every line when pasting the list's contents somewhere, Firefox 2 adds the number. In my opinion this isn't a big problem since in the implementation it adds only an[^1] optional parameter to the highlight_[strig|file] functions and is not changing the phps output (which would need an addition ini setting or maybe one might use the GET parameters to turn it on...) So it should "harm" only the ones requesting it. When first proposing it I was told that someone who knows the parser should have a look at it to avoid problems there, even though the patch shouldn't have any impact as far as I can see but nobody had the time to look into it. If there's an serious consideration I can check my disk apply it to the current CVS and post that patch again. [^1] If I remember correct the last version of the patch I proposed didn't add just one additional parameter but three of them. The first to enable the line numbering, the second to enable jumpmarks using <a name="" or id="" attributes (I think the latter but am not sure) and a third one to give these jumpmarks individual prefixes to allow posting multiple numbered code snippets on a single page. johannes On Mon, 2006-11-20 at 14:20 -0500, Sean Coates wrote: > > Back in March we were discussing the adoption of a patch for 5.2/6 for > > line numbering in phps. > > > > When last discussed, most folks thought the idea was good and it did not > > impact on anything else dramatically. > > We determined that there's no reliable way to number lines and maintain > copy-and-paste. > > S > -- Johannes Schlüter | http://schlueters.de

« previous php.internals (#26686) next »