[PATCH] hgweb: render tabs to 8 spaces

Matt Mackall mpm at selenic.com
Tue May 12 09:50:59 CDT 2009


On Tue, May 12, 2009 at 04:10:50PM +0200, Rocco Rutte wrote:
> Hi,
> 
> * Dirkjan Ochtman wrote:
> > On Tue, May 12, 2009 at 2:17 PM, Rocco Rutte <pdmef at gmx.net> wrote:
> > > # HG changeset patch
> > > # User Rocco Rutte <pdmef at gmx.net>
> > > # Date 1242130614 -7200
> > > # Node ID fb49b489bd52d1de59d5b82b0277aa17d0c2ecbf
> > > # Parent ??cdb2f85fb2f5a7c2a5f103a7ac13067cfd682d65
> > > hgweb: render tabs to 8 spaces
> > >
> > > Otherwise it renders code unreadable that uses tab for indentation
> > > and spaces for alignment.
> > 
> > For one thing, this used to work without this. Is there a plausible
> > reason it doesn't anymore, or can we re-instate the former working
> > way?
> 
> Digging further into this, it turns out that tabs make it to the
> browser. They're rendered incorrect since changeset 7392:03b60f2f90bf
> which changes to <div/> from <table/>. Now the line number is part of
> the content, too, which is used for offset computation.

Yeah, I thought I'd noticed something like that. Perhaps we should
just make the line number column exactly eight characters?
 
> > For another, I think 4 spaces is more appropriate then 8 spaces.
> 
> It's probably overkill to add an option for it, but I have projects that
> 4 and others that 8 spaces for tabs.

Let's stick with 8. If there's a standard tab width, it's 8.

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial-devel mailing list