Last modified: 2013-07-08 18:09:33 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.
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.
[Parsoid component reorg by merging JS/General and General. See bug 50685 for more information. Filter bugmail on this comment. parsoidreorg20130704]
So, maybe a better fix for this situation is to strip trailing whitespace from parsed extension output that Parsoid receives from the PHP parser.
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
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
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
Change 72558 merged by jenkins-bot: Bug 50713: Strip two trailing newlines that action=parse adds https://gerrit.wikimedia.org/r/72558