Hi guys,
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.
Is there anybody willing to COMMIT this patch or at least can we get a vote on
who wants it?
Kind regards
kevin
--
"Democracy is two wolves and a lamb voting on what to have for lunch.
Liberty is a well-armed lamb contesting the vote."
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
This one time, at band camp, Sean Coates sean@caedmon.net wrote:
We determined that there's no reliable way to number lines and maintain
copy-and-paste.
This is not rocket science.
A simple CSS solution...
}
</style>
--
"Democracy is two wolves and a lamb voting on what to have for lunch.
Liberty is a well-armed lamb contesting the vote."
<html> <head> <style> .numberline{ display: inline; float: left; width: 15px; } .code{ display: inline;This is not rocket science.
A simple CSS solution...
}
</style>
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
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
This one time, at band camp, Johannes Schlüter johannes@php.net wrote:
[^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.
outstading :)
Why not also a parameter to select the beginning line??
so that you might begin the numbering from lin3 number 322
Kind regards
Kevin
--
"Democracy is two wolves and a lamb voting on what to have for lunch.
Liberty is a well-armed lamb contesting the vote."
Hi,
This one time, at band camp, Johannes Schlüter johannes@php.net wrote:
[^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.outstading :)
Why not also a parameter to select the beginning line??
so that you might begin the numbering from lin3 number 322
I don't think this is really needed, the numbering of the <ol> I'm using
there can be changed by CSS and I think it's better to let the user
count the lines used by the jumpmarks than adding yet another parameter,
I even think it might be good to merge my second and third param
(false/null no jump mark, true default, some stirng use that as prefix)
into one (which still doesn't mean there being place for some other)
functions with too many option parameters are just painful imo.
johannes
Johannes Schlüter | http://schlueters.de