Last modified: 2013-07-08 18:09:33 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 T52713, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50713 - Parsoid adds span with newline after extension tags
Parsoid adds span with newline after extension tags
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: ssastry
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-04 02:06 UTC by Roan Kattouw
Modified: 2013-07-08 18:09 UTC (History)
2 users (show)

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


Attachments

Description Roan Kattouw 2013-07-04 02:06:48 UTC
See http://parsoid.wmflabs.org/mw/User:Catrope/Syntax

The Parsoid rendering of <syntaxhighlight>...</syntaxhighlight> looks something like:

<div typeof="mw:Extension/syntaxhighlight" about="#mwt3">
  content here
</div><span about="#mwt3">
</span>

StoneBird (GSoC student) found this bug in syntaxhighlight and he and Trevor banged their heads against the wall for a while. Jiabao (other GSoC student) had the same issue with <math> and figured it out on her own.

In general, Parsoid shouldn't wrap inter-element whitespace in about-grouped spans, because VE is able to deal with IEW within about groups.
Comment 1 ssastry 2013-07-04 02:45:48 UTC
As it works now, the serializer needs to know what HTML pieces comes from a transclusion/extension and should be ignored.  So, if trailing whitespace is not marked in about-group spans, it will get serialized and generate dirty diffs.
Comment 2 Andre Klapper 2013-07-04 10:34:55 UTC
[Parsoid component reorg by merging JS/General and General. See bug 50685 for more information. Filter bugmail on this comment. parsoidreorg20130704]
Comment 3 ssastry 2013-07-05 17:37:49 UTC
So, maybe a better fix for this situation is to strip trailing whitespace from parsed extension output that Parsoid receives from the PHP parser.
Comment 4 Gerrit Notification Bot 2013-07-05 22:07:18 UTC
Change 72219 had a related patch set uploaded by Subramanya Sastry:
(Bug 50713) Trim WS from ext. output extremities before using it

https://gerrit.wikimedia.org/r/72219
Comment 5 Gerrit Notification Bot 2013-07-08 18:05:38 UTC
Change 72558 had a related patch set uploaded by GWicke:
Bug 50713: Strip two trailing newlines that action=parse adds

https://gerrit.wikimedia.org/r/72558
Comment 6 Gerrit Notification Bot 2013-07-08 18:08:06 UTC
Change 72219 abandoned by Subramanya Sastry:
(Bug 50713) Trim WS from ext. output extremities before using it

Reason:
Fixed by https://gerrit.wikimedia.org/r/72558

https://gerrit.wikimedia.org/r/72219
Comment 7 Gerrit Notification Bot 2013-07-08 18:09:14 UTC
Change 72558 merged by jenkins-bot:
Bug 50713: Strip two trailing newlines that action=parse adds

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

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


Navigation
Links