Page MenuHomePhabricator

Parsoid: round-trip unexpanded templates
Closed, DeclinedPublic

Description


Version: unspecified
Severity: enhancement

Details

Reference
bz37910

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:25 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz37910.

Mass-moving bugs into the new 'Parsoid' product.

We decided against explicitly supporting the round-tripping of unexpanded templates as this would not help to identify DOM constructs built up from several templates. An example for this would be the famous table start / row / end templates. This is needed so that content between these templates can be protected from editing. Inserting 'foo' between a table-start and a table-row template call will probably not produce the expected result when the templates are later expanded.

We developed a working template encapsulation algorithm that identifies the DOM subtree affected by expanded template output, so this simpler workaround solution is not needed.

In case this is needed later, it would be trivial to implement by setting the proper RDFa and data-parsoid information on an unexpanded (probably meta-based) template element.