Last modified: 2011-04-14 15:14:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 12751 - First tab character in a preformatted paragraph converted to wrong number of spaces
First tab character in a preformatted paragraph converted to wrong number of ...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2008-01-23 03:33 UTC by x00000000
Modified: 2011-04-14 15:14 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description x00000000 2008-01-23 03:33:44 UTC
This wiki syntax (the columns are separated by single tab characters):

 1	a	a	a
 2	b	b	b
 3	c	c	c
 4	d	d	d
 5	e	e	e

will be formatted as:

1  a       a       a
2       b       b       b
3       c       c       c
4       d       d       d
5       e       e       e

<pre/> works correctly if the start tag is on its own line, but not if the first line is prepended by it. The following code produces the same output as wiki syntax:

<pre>1	a	a	a
2	b	b	b
3	c	c	c
4	d	d	d
5	e	e	e</pre>

I suspect that the tab-to-space converting algorithm incorrectly doesn't remove the leading <pre> before calculating the position of the tab stops, and that wiki syntax is converted to this <pre> version internally before tab-to-space conversion.
Comment 1 Brion Vibber 2008-02-01 23:44:55 UTC
I'm guessing this is an issue with the HTML Tidy postprocessing.

On my local machine, everything looks good with or without Tidy; Tidy translates the raw tabs to spaces, but appears to do it "correctly", or at least consistently. On live Wikipedia, I get the results described. (Added sample URL http://smorgasbord.local/trunk/index.php/Tabby )

So this may be a matter of upgrading Tidy etc.
Comment 2 x00000000 2008-02-02 23:13:17 UTC
I just observed this bug on and verified it on; I don't have a own MediaWiki installation.

Indeed I can reproduce this bug with Tidy, however not only with the 2005-10-26 version (last packaged distribution), but also with the latest CVS version. I filed a bug against Tidy:

A workaround in MediaWiki would be to output a '\n' after the <pre> when converting wiki syntax to HTML.

Note You need to log in before you can comment on or make changes to this bug.