Page MenuHomePhabricator

Serialization: Fetch data-parsoid for copy-pasted content based on revid attributes
Open, MediumPublic

Description

As part of T119145: Copy-Paste: VE should add rev-id attributes to content pasted from other wikipages, VE is going to add a revid attribute for content that is pasted from other pages. On its end, Parsoid should fetch the data-parsoid attributes from RESTBase for those revids and add them to affected elements so that serialization preserves any wikitext formatting details specific to the pasted content.

There are a number of ways of doing this. Prefetch the data-parsoid revisions as part of the normalization routine, or doing it on demand during serialization. Prefetching would be a simpler approach since it leaves the rest of the serialization code unaffected. But, I can imagine that that data-parsoid fetch can be abstracted away so that it can be done on-demand especially with the async WTS support being added as part of T115720: Refactor WTS to be async.