code: function replace(match, text) {
          var rng = rangeFromMatch(match);
  
          rng.deleteContents();
  
          if (text.length > 0) {
            rng.insertNode(editor.dom.doc.createTextNode(text));
          }
  
          return rng;
        }
docs: Replaces the specified match with the specified text.
  
  @param {Object} match Match object to replace.
  @param {String} text Text to replace the match with.
  @return {DOMRange} DOM range produced after the replace.