anchor.diff:      return false;
     }
   
  -  void _applyAutoLink(String link) {
  +  void _applyAutoLink(String selectionText, String link) {
       // note that contentInput.value now include pasted text.
   
       // compute next appendix index
  
positive.code:     int nextIndex = ReferenceAppendix.nextIndex(existRefs);
  
      // replace with placeholder and append appendix
      // note that we only search first occurrence of link, so if multiple link present.
      // the replace will be problematic.
      var placeholder = i18n("kmark.auto-link-placeholder");
      var replacedText = " [$placeholder][$nextIndex] ";
      contentInput.value = contentInput.value.replaceFirst(link, replacedText);
      if (existRefs.isEmpty) {
        contentInput.value += "\n";
  
negative.code: import 'dart:html';
  import 'dart:math' as Math;
  import 'package:kaif_web/util.dart';
  import 'dart:async';
  
  class KmarkAutoLinker {
  
  