Last modified: 2014-09-30 10:37:05 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 T71240, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69240 - Investigate adding category link (and any other rendering-transparent wikitext tags) to the "empty-line" concept in Parsoid code
Investigate adding category link (and any other rendering-transparent wikitex...
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: High normal
: ---
Assigned To: Marc Ordinas i Llopis
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-07 14:15 UTC by Kelson [Emmanuel Engelhart]
Modified: 2014-09-30 10:37 UTC (History)
2 users (show)

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


Attachments

Description Kelson [Emmanuel Engelhart] 2014-08-07 14:15:33 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
Comment 1 ssastry 2014-08-07 14:22:44 UTC
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.
Comment 2 Marc Ordinas i Llopis 2014-09-25 19:11:46 UTC
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.
Comment 3 Gerrit Notification Bot 2014-09-25 19:12:03 UTC
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
Comment 4 ssastry 2014-09-25 20:15:02 UTC
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.
Comment 5 Marc Ordinas i Llopis 2014-09-26 11:35:32 UTC
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.
Comment 6 Gerrit Notification Bot 2014-09-26 18:17:17 UTC
Change 162953 merged by jenkins-bot:
Bug 69240: Make lang-links sol-transparent

https://gerrit.wikimedia.org/r/162953
Comment 7 Kelson [Emmanuel Engelhart] 2014-09-30 10:37:05 UTC
Thank you very much for this patch!

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


Navigation
Links