Page MenuHomePhabricator

Store metadata as block nodes in the main data list
Closed, DuplicatePublic0 Estimated Story Points

Description

Currently, MetaItems are stored outside the main linear data structure, in a separate meta linear data structure. This complicates the processing of linear data: transaction processing, rebasing, serialization/deserialization etc, and makes it harder to reason about document correctness. Instead:

  • Store metadata as block nodes in the main data list
  • On conversion from HTML, hoist metadata found in a content position to a legal structural position
  • On conversion back to HTML, roundtrip metadata hoisted from unmodified content branch nodes back into the original content position
  • When deleting across metadata (e.g. <p>foo[-</p><meta/><p>-]bar</p>), hoist metadata to a legal structural position as necessary

Related Objects