[PATCH RFC V2] hgweb: code selection without line numbers in file source view

Matt Mackall mpm at selenic.com
Mon Jul 1 13:22:16 CDT 2013


On Mon, 2013-07-01 at 11:43 +0400, Alexander Plavin wrote:
> The ability to get link on
> click is added again in the next patch.

That too is against the rules. Please remove the "take an intentional
step backwards" from your list of acceptable moves.

> > I think at this point we need to step back and look at the prerequisites
> > for what you're trying to do here:
> >
> > - correct display:
> >    - indentation [2]
> >    - embedded whitespace
> >    - monospace
> 
> Can't see where the display is incorrect when using my code (it runs
> at hg.aplavin.ru).

This is a list or prerequisites, not a list of things you did wrong.

> > - anchor links
> 
> Commented above.
> 
> > + nice cut and paste
> >    + no line numbers
> >    + correct embedded whitespace
> >
> > If you have to mangle the whitespace to get rid of the line numbers, I
> > don't really see the point in trying: you can't paste it into your
> > editor without editing anyway.
> >
> > I put together this test case on Friday:
> >
> >  http://www.selenic.com/space.html
> >
> > ..and it does not look at all promising, especially with tabs.
> >
> > Since the exisiting <pre> style seems to mostly work, perhaps this is a
> > situation where we should use Javascript. Stick to the existing HTML,
> > but post-process it to turn the line number into a CSS decoration ala
> >
> >  http://en.support.wordpress.com/code/posting-source-code/
> 
> Even the last example at their page displays incorrectly for me, so
> probably not a good example.

Looks fine to me in Firefox/Chrome., but I'm not suggesting we copy
their code anyway.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list