Last modified: 2014-09-30 10:37:05 UTC
Here is the PHP parser output: https://fr.wikivoyage.org/w/index.php?title=Amérique_du_Nord&oldid=220501 And the Parsoid output: http://parsoid-lb.eqiad.wikimedia.org/frwikivoyage/Amérique_du_Nord?oldid=220501
Related bug from my notes from recent visual diff testing: 1. Consider this snippet. In Parsoid, the whitespace and the category are wrapped in a p-tag which occupies non-zero screenspace. In PHP, looks like it disappears. ---------------------------- {{Aligudarz County}} [[Category:Populated places in Aligudarz County]] {{Aligudarz-geo-stub}} --------------------------- So, the general bug is that Parsoid doesn't know to suppress rendering-transparent tags when it comes to pre-, paragraph-, and possibly other transformations. We already have support for "empty-line" handling. If we include category-links as part of empty-lines, that might do the trick without having to add any special cases elsewhere.
The problem seems to be that mw:PageProp/Language is not considered a SOL transparent link. Making it be so reduces the visual differences, but then some tests don't pass like: INPUT: Blah blah blah [[zh:Chinese]] RAW EXPECTED:<p>Blah blah blah <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/></p> RAW RENDERED:<p data-parsoid='{"dsr":[0,14,0,0]}'>Blah blah blah</p> <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese" data-parsoid='{"stx":"simple","a":{"href":"http://zh.wikipedia.org/wiki/Chinese"},"sa":{"href":"zh:Chinese"},"dsr":[15,29,null,null]}'/> NORMALIZED EXPECTED: <p>Blah blah blah </p> NORMALIZED RENDERED: <p>Blah blah blah</p> Will investigate further.
Change 162953 had a related patch set uploaded by Marcoil: WIP: Bug 69240: mw:PageProp:Language should be considered a SOL transparent link tag. https://gerrit.wikimedia.org/r/162953
This change is because of my latest p-wrapping commits on master -- https://gerrit.wikimedia.org/r/#/c/162815/. The new output is correct. Parser tests output should be fixed up instead. We can chat more on IRC if you have questions.
There still a problem when there're more than one language link, like in test "Double interlanguage link": Blah blah blah [[es:Spanish]] [[zh:Chinese]] This gives <p>Blah blah blah <link rel="mw:PageProp/Language" href="http://es.wikipedia.org/wiki/Spanish"/></p> <link rel="mw:PageProp/Language" href="http://zh.wikipedia.org/wiki/Chinese"/> So, the first one gets put into the <p> but not the second one. I'm not sure what the result should be here, but I suppose both links should be outside. Let's discuss possible solutions here or on IRC.
Change 162953 merged by jenkins-bot: Bug 69240: Make lang-links sol-transparent https://gerrit.wikimedia.org/r/162953
Thank you very much for this patch!