[PATCH RFC V2] hgweb: code selection without line numbers in file source view
Laurens Holst
laurens.nospam at grauw.nl
Mon Jul 1 11:35:53 UTC 2013
Op 01-07-13 10:04, Alexander Plavin schreef:
> Forgot to add a couple of comments in the previous email. First, the
> copying in the current hgweb also isn't good at all at firefox, so
> probably the best way is to use 'just pre' variant from your page. And
> last, if it's ok to use javascript for this,may be the easiest way is
> just to remove the leading numbers from the clipboard on copy.
Maybe noteworthy, <pre> tags can still have other tags in them. E.g.
<pre><span class="odd">xxx</span>
<span class="even">xxx</span></pre>
or even:
<pre><ol><li class="odd">xxx</li>
<li class="even">yyy</li>
</ol></pre>
You could perhaps use this in combination with CSS generated content [1]
(I don’t know how good browser support for that is nowadays, I reckon
it’s probably pretty decent with Microsoft having stepped up their game)
to generate the line numbers... Or JavaScript, if there’s no other way.
~Laurens
[1] http://www.w3.org/TR/CSS21/generate.html
More information about the Mercurial-devel
mailing list