i'm looking through the wave code and all the documentation, and trying to
clarify how annotationBoundary should be formed in the following case: if
the key is already in the annotation update, and we are changing it using
boundary map, should the old value specified by the boundary be the current
old value in the annotation update, or the current old value of the next
item?

take this case: suppose the initial document state is simply "12", and i
would like to add a different href annotation on both characters. is the
correct operation this:

annotationBoundary([], ['href'], null, ['1-val'])
retain(1)
annotationBoundary([], ['href'], ['1-val'], ['2-val'])
retain(1)

OR

annotationBoundary([], ['href'], null, ['1-val'])
retain(1)
annotationBoundary([], ['href'], null, ['2-val'])
retain(1)

obviously, the annotation update before the 2nd character is retained
should be (null -> '2-val'), but that can happen given both these
operations depending on the semantics of annotationBoundary. that is, when
applying the boundary, does the old value in the update remain the old
value that existed prior to applying the boundary (1-val in this case), or
is it the current value of the next item (null)?

Reply via email to