Last modified: 2014-04-16 20:53: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 T52771, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50771 - Default whitespace for lists (*, #, ; :) should include a space after the list token
Default whitespace for lists (*, #, ; :) should include a space after the lis...
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal enhancement
: ---
Assigned To: ssastry
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-04 20:34 UTC by Bartosz Dziewoński
Modified: 2014-04-16 20:53 UTC (History)
6 users (show)

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


Attachments

Description Bartosz Dziewoński 2013-07-04 20:34:19 UTC
Default whitespace for lists (*, #, ; :) should include a space after the list token. Or in other words: for newly inserted list items, prefer "* text" to "*text". It's prettier :)

(Is this a Parsoid issue?)
Comment 1 James Forrester 2013-07-05 00:40:14 UTC
(In reply to comment #0)
> (Is this a Parsoid issue?)

Yes.

(Also, I think I agree with this change.)
Comment 2 ssastry 2013-07-05 17:22:53 UTC
I have a fix for this, but it just makes a lot of our existing html2wt and html2html tests fail because of the extra leading space. I'll have to fix our test result normalization code to get smarter before I submit this for review.

I'm assuming this is not not high priority.
Comment 3 Gerrit Notification Bot 2013-07-05 17:26:06 UTC
Change 72112 had a related patch set uploaded by Subramanya Sastry:
WIP: (Bug 50771) Add space after bullets for new lists

https://gerrit.wikimedia.org/r/72112
Comment 4 Gabriel Wicke 2013-07-09 03:14:34 UTC
See also for whitespace handling in the DOM: bug 51004
Comment 5 Gerrit Notification Bot 2013-07-09 05:06:23 UTC
Change 72112 merged by jenkins-bot:
(Bug 50771) Add space after bullets for new lists

https://gerrit.wikimedia.org/r/72112
Comment 6 Bartosz Dziewoński 2013-07-19 00:23:53 UTC
So is this fixed now?
Comment 7 Gabriel Wicke 2013-07-19 02:28:28 UTC
Yes. Ideally we should probably try to match the styling of other list items when a new item is added, but that can be done later and in another bug.
Comment 8 Gabriel Wicke 2013-07-19 02:30:55 UTC
See bug 51654 for white-space matching.
Comment 9 C. Scott Ananian 2014-04-16 18:53:00 UTC
I don't think the resolution of this bug was correct.

The PHP parser generates:
<li> x
for * x

and

<li>x
for *x

I think Parsoid should be matching this behavior.  If VE wants spaces before list items in wikitext by default, it should be inserting a space as the first character inside the <li>.
Comment 10 James Forrester 2014-04-16 20:53:22 UTC
(In reply to C. Scott Ananian from comment #9)
> I don't think the resolution of this bug was correct.
> 
> The PHP parser generates:
> <li> x
> for * x
> 
> and
> 
> <li>x
> for *x
> 
> I think Parsoid should be matching this behavior.  

> If VE wants spaces before list items in wikitext by default, it should be
> inserting a space as the first character inside the <li>.

No. Firstly, this isn't a VE-requested change, it's a community requested change for Parsoid to output wikitext following the behaviour expected of wikitext users, explicitly favouring "* Foo" over "*Foo". Secondly, VE doesn't care how the platform on which it is running stores the data as long as it comes back consistently in HTML.

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


Navigation
Links