editor-js / document-model

❗️WIP❗️
Apache License 2.0
10 stars 2 forks source link

Revise inline fragments normalization #53

Open gohabereg opened 9 months ago

gohabereg commented 9 months ago

Currently inline fragments are merged in case two neighbouring fragments:

  1. are from the same tool
  2. the second fragment starts at index where the first one ends

How it should work ideally:

  1. Two fragments in the fragments array are from the same tool
  2. The second fragment starts at index where the first one ends

Naive solution would be O(n^2), we should think of more efficient solution