Last modified: 2013-12-13 20:14:58 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 T53744, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51744 - Default whitespace for headings should include spaces before/after ==
Default whitespace for headings should include spaces before/after ==
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
serializer (Other open bugs)
unspecified
All All
: Normal enhancement
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks: ve-nonenglish
  Show dependency treegraph
 
Reported: 2013-07-20 11:49 UTC by Bartosz Dziewoński
Modified: 2013-12-13 20:14 UTC (History)
6 users (show)

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


Attachments

Description Bartosz Dziewoński 2013-07-20 11:49:32 UTC
As a follow-up to bug 49428 and bug 50771, default whitespace for headings should includespaces before/after ==.

Or in other words: prefer "== Heading ==" to "==Heading==".

(While this might seem minor, the first style was enforced at pl.wp with automated tools since ever and editors gets annoyed when VE changes it. Reported at https://pl.wikipedia.org/wiki/Wikipedia:VisualEditor/Opinie#sprz.C4.85tanie_kodu )
Comment 1 ssastry 2013-07-20 14:24:59 UTC
It would be very helpful if you can provide a list of any other default whitespace rules for other wikitext elements.  It is simpler to implement this in one shot rather than piecemeal.

Right now, we cannot implement different rules for different wikipedias, but, if necessary, something that we could consider at a later point.  So, can you also include some information, if you have, about whether the style rules are universal or specific to pl.wp?
Comment 2 Bartosz Dziewoński 2013-07-20 14:30:31 UTC
(In reply to comment #1)
> It would be very helpful if you can provide a list of any other default
> whitespace rules for other wikitext elements.  It is simpler to implement
> this
> in one shot rather than piecemeal.

Sorry, I post these when I notice Parsoid is doing things not in my way :)


> Right now, we cannot implement different rules for different wikipedias, but,
> if necessary, something that we could consider at a later point.  So, can you
> also include some information, if you have, about whether the style rules are
> universal or specific to pl.wp?

Yeah, of course. No idea if any other wikis use any similar cleanup tools as pl.wp, but in general more whitespace is more readable than less (wikitext is just like code in this regard :) ).

The tools pl.wp uses is [[pl:MediaWiki:Gadget-sk.js]], but be aware that it also includes some non-code cleanup and some pl.wp-specific rules for template replacements etc.
Comment 3 ssastry 2013-07-20 14:38:55 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > It would be very helpful if you can provide a list of any other default
> > whitespace rules for other wikitext elements.  It is simpler to implement
> > this
> > in one shot rather than piecemeal.
> 
> Sorry, I post these when I notice Parsoid is doing things not in my way :)

Thats okay.  I was not complaining, just making a request. :).  

You can test existing Parsoid behavior @ http://parsoid.wmflabs.org/_html/ and report what needs fixing.
Comment 4 Elitre 2013-10-30 21:03:53 UTC
The French Wikipedia would be interested in this change as well, since they use a lot of "extra" spaces, and the headers are no exception.
Comment 5 ssastry 2013-11-21 16:57:53 UTC
Okay, I started to tackle this. The basic fix is quite simple, but it introduces a ton of noisy diffs in our parser tests and it will likely introduce a lot of noisy diffs in roundtrip testing as well. We could fix our testing infrastructure to ignore them, but a better solution is to leave existing headings untouched.

I can instead add this rule on new headings and leave old headings untouched.

But, looking at pages on enwp, I see (by clicking around on a about 10 "random" pages) that most headings don't use spaces after/before "==". I assume these extra spaces will not be an issue on enwp and doesn't violate any style guidelines there?
Comment 6 Bartosz Dziewoński 2013-11-21 17:10:28 UTC
(In reply to comment #5)
> I assume these
> extra spaces will not be an issue on enwp and doesn't violate any style
> guidelines there?

No, per [[MOS:HEAD]], "Spaces between the equal signs and the heading text are optional, and will not affect the way the heading is displayed". It doesn't mention anything about them being uncool, and most of the wikis I frequent use them for readability.
Comment 7 Gerrit Notification Bot 2013-11-21 17:21:15 UTC
Change 96790 had a related patch set uploaded by Subramanya Sastry:
(Bug 51744) Add space around = chars in new headings

https://gerrit.wikimedia.org/r/96790
Comment 8 Gerrit Notification Bot 2013-12-03 23:51:23 UTC
Change 96790 merged by jenkins-bot:
(Bug 51744) Add space around = chars in new headings

https://gerrit.wikimedia.org/r/96790
Comment 9 Bartosz Dziewoński 2013-12-04 14:10:46 UTC
I assume this is fixed now? Thank you!
Comment 10 ssastry 2013-12-04 15:40:23 UTC
Yes. Will be deployed today. Closing this bug now.
Comment 11 Gerrit Notification Bot 2013-12-13 19:53:52 UTC
Change 101275 had a related patch set uploaded by GWicke:
Merge "(Bug 51744) Add space around = chars in new headings"

https://gerrit.wikimedia.org/r/101275
Comment 12 Gerrit Notification Bot 2013-12-13 19:55:08 UTC
Change 101318 had a related patch set uploaded by GWicke:
(Bug 51744) Add space around = chars in new headings

https://gerrit.wikimedia.org/r/101318
Comment 13 Gerrit Notification Bot 2013-12-13 19:57:13 UTC
Change 101275 merged by GWicke:
Merge "(Bug 51744) Add space around = chars in new headings"

https://gerrit.wikimedia.org/r/101275
Comment 14 Gerrit Notification Bot 2013-12-13 19:57:25 UTC
Change 101318 merged by GWicke:
(Bug 51744) Add space around = chars in new headings

https://gerrit.wikimedia.org/r/101318

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


Navigation
Links