Page MenuHomePhabricator

Template + First paragraph treated like a complex transclusion
Open, LowPublic

Description

Open https://ht.wikipedia.org/w/index.php?oldid=331709 in VisualEditor. Select and delete the large blue template on the right.

Expected result: The template goes away.

Actual result: The template and the first paragraph of text goes away.

Event Timeline

Restricted Application added a project: VisualEditor. · View Herald TranscriptJun 16 2016, 3:55 AM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald Transcript

Could also be a malformed template

This is somewhat of a known edge case in our paragraph wrapping code.

The Definisyon template on htwiki has trailing newlines (that precede the <noinclude> section at the end) which then combine with the newlines in the top-level page to introduce a paragraph break that straddles the template - toplevelpage boundary and forces both of them to be template wrapped as a unit.

We could tweak our paragraph wrapping code to be cognizant of crossing template boundaries and do something a bit more smarter, but it is complexity I don't wish to add unless this behavior is common. Eventually, we expect that the paragraph wrapping code in both core and Parsoid will evolve to eliminate some of these edge cases.

ssastry triaged this task as Low priority.Jun 21 2016, 4:01 PM
LGoto moved this task from Needs Triage to Backlog on the Parsoid board.Feb 15 2020, 9:42 PM
ssastry moved this task from Backlog to Feature requests on the Parsoid board.May 12 2020, 9:12 PM