[PATCH] hgweb: render tabs to 8 spaces

Rocco Rutte pdmef at gmx.net
Tue May 12 09:10:50 CDT 2009


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.

> 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.

Rocco


More information about the Mercurial-devel mailing list