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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T14751, the corresponding Phabricator task for complete and up-to-date bug report information.
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)
1.12.x
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
http://smorgasbord.local/trunk/index....
:
Depends on:
Blocks:
  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: ---


Attachments

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 de.wikipedia.org and verified it on test.wikipedia.org; 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: http://sourceforge.net/tracker/index.php?func=detail&aid=1885471&group_id=27659&atid=390963

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.


Navigation
Links