message: Check map for local reference existence
diff: @@ -30,7 +30,7 @@ export class SliceManager extends EventEmitter {
  public submit(begin: number, end: number, content: string) {
  const ref = new LocalRefManager(this.root, begin, end);
  if (ref.prepare()) {
  - const refId = `${begin}-${end}`;
  + const refId = `${begin}:${end}`;
  this.refMap.set(refId, ref);
  const input: IDocTile = {
  begin,
  @@ -52,7 +52,8 @@ export class SliceManager extends EventEmitter {
  if (result.input.documentId !== this.docId) {
  return;
  }
  - const refId = `${result.input.begin}-${result.input.end}`;
  + const refId = `${result.input.begin}:${result.input.end}`;
  + if (this.refMap.has(refId)) {
  const localRef = this.refMap.get(refId);
  const localRefText = this.getTextFromLocalRef(localRef);
  const textBefore = result.input.content;
  @@ -66,6 +67,8 @@ export class SliceManager extends EventEmitter {
  // Always remove references. Resubmission will create a new one.
  localRef.removeReferences();
  this.refMap.delete(refId);
  + }
  +
  });
  }
  