Page MenuHomePhabricator

VisualEditor: Pre-annotations code annotates characters with the empty set
Closed, ResolvedPublic

Description

  1. Open any document
  2. Blank it
  3. Type some text
  4. Dump the model into the console (ve.instances[0].documentModel.data)

Expected output: [ 'F', 'o', 'o', 'b', 'a', 'r' ]
Actual output: [ 'F', ['o', ve.AnnotationSet([])], ['b', ve.AnnotationSet([])] ...

The pre-annotations code is applying the empty set as a pre-annotation to every character except the first. This shouldn't happen, it should just not annotate if it's got nothing to annotate with.


Version: unspecified
Severity: normal

Details

Reference
bz42279