Last modified: 2014-11-17 09:43:49 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 T73361, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71361 - Paragraph wrapping only moves out the last SOL-transparent link
Paragraph wrapping only moves out the last SOL-transparent link
Status: NEW
Product: Parsoid
Classification: Unclassified
token-stream transforms (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: ssastry
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-26 17:13 UTC by Marc Ordinas i Llopis
Modified: 2014-11-17 09:43 UTC (History)
4 users (show)

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


Attachments

Description Marc Ordinas i Llopis 2014-09-26 17:13:57 UTC
With wikitext such as (taken from test "Double interlanguage link")

Blah blah blah
[[es:Spanish]]
[[zh:Chinese]]

the output is

<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"/>

Only the last link is taken out of the <p> by ParagraphWrapper::closeOpenPTag instead of all of them. This doesn't produce any visual differences but it looks strange.

Found while fixing bug #69240, more information there.

Another possible case (or an unrelated issue) appears with this enwiki text:

----------------------------
{{Aligudarz County}}


[[Category:Populated places in Aligudarz County]]

{{Aligudarz-geo-stub}}
---------------------------

where a category link gets put inside an unnecessary <p> because of an existing <br/>.
Comment 1 ssastry 2014-10-15 21:19:52 UTC
(In reply to Marc Ordinas i Llopis from comment #0)

> Another possible case (or an unrelated issue) appears with this enwiki text:
> 
> ----------------------------
> {{Aligudarz County}}
> 
> 
> [[Category:Populated places in Aligudarz County]]
> 
> {{Aligudarz-geo-stub}}
> ---------------------------
> 
> where a category link gets put inside an unnecessary <p> because of an
> existing <br/>.

I had added this to bug 69240, and this p-wrapping issue not related to the rendering. It seems PHP parser+Tidy have inconsistent handling here. See  https://en.wikipedia.org/wiki/User:SSastry_%28WMF%29/Tests:whitespace?oldid=629764353 vs
http://parsoid-lb.eqiad.wikimedia.org/enwiki/User%3ASSastry_%28WMF%29%2FTests%3Awhitespace?oldid=629764353

A patch for the p-wrapping issue itself is coming up shortly.
Comment 2 Gerrit Notification Bot 2014-10-15 21:49:06 UTC
Change 166891 had a related patch set uploaded by Subramanya Sastry:
(Bug 71361) Leave link tags out of p-wrappers wherever possible.

https://gerrit.wikimedia.org/r/166891
Comment 3 ssastry 2014-10-15 21:50:04 UTC
Still failing:

a [[Category:A1]]
[[Category:A2]] [[Category:A3]]
[[Category:A4]]
Comment 4 Gerrit Notification Bot 2014-10-16 05:11:12 UTC
Change 166891 merged by jenkins-bot:
(Bug 71361) Leave link tags out of p-wrappers wherever possible.

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

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


Navigation
Links