Page MenuHomePhabricator

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


Open 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 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.