Page MenuHomePhabricator

When serializing DOM subtree of <h*> tags, force meta tags (links, categories, etc.) to serialize before / after heading as appropriate
Closed, ResolvedPublic0 Estimated Story Points

Description

This is a bit contrived, but a bug nonetheless:

  1. Go to [[testwiki:Sections galore]]
  2. Observe the wikitext source, then edit in VE
  3. Let's say you want to rewrite this article, so you select the entire lead and first section (from "Lead..." to "...core") and type some new text over it
  4. Make your new text into a heading
  5. Review changes

The category inclusion (which was previously before the "Apple" heading) becomes part of the new heading, which is silly from the point of view of a wikitext user.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=72048

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:47 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz50373.

I think the right approach would be to reparent metas (at least for categories and langlinks) in this circumstance to the end of the page, but this feels messy in general.

Upping to normal, since this is happening in real articles.

Shouldn't Parsoid be dealing with this?

Arlolra set Security to None.
ssastry renamed this task from Parsoid: Category inclusions can end up as part of headings to When serializing DOM subtree of <h*> tags, force meta tags (links, categories, etc.) to serialize before / after heading as appropriate.Feb 3 2015, 6:39 PM
ssastry raised the priority of this task from Medium to High.
ssastry moved this task from Needs Triage to VE Q3 on the Parsoid board.
gerritbot subscribed.

Change 188488 had a related patch set uploaded (by Arlolra):
Hoist metas from headings when serializing

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

Patch-For-Review

Change 188488 merged by jenkins-bot:
Hoist metas from headings when serializing

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

Change 188942 had a related patch set uploaded (by Arlolra):
Hoist out non-content as well, if we hit a link

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

Patch-For-Review

Change 188942 merged by jenkins-bot:
Hoist out non-content as well, if we hit a link

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