document.execCommand = (function(_execCommand) {
  var isBuggy = true;
  
  function complete(element, result) {
    if (result) {
      var event = document.createEvent('Event');
      event.initEvent('input', true, false);
      element.dispatchEvent(event);
    }
    return result;
  }
  
  function getEditable(element) {
    while (element &&
        !(element.nodeType == 1 && element.hasAttribute('contenteditable'))) {
      element = element.parentNode;
    }
    return element;
  }
  
  function restore() {
    isBuggy = false;
    document.execCommand = _execCommand;
  }
  
  function exec(cmd, ui, arg) {
    return _execCommand.call(document, cmd, ui, arg);
  }
  
  function shimExec(element, cmd, ui, arg) {
    return complete(element, exec(cmd, ui, arg));
  }
  
  function shim(element, cmd, ui, arg) {
    element.addEventListener('input', restore, true);
    var result = exec(cmd, ui, arg);
    element.removeEventListener('input', restore, true);
    if (isBuggy) {
      shim = shimExec;
      return complete(element, result);
    }
  }

  function wrapper(cmd, ui, arg) {
    var element = getEditable(getSelection().anchorNode);
    return (element && element.isContentEditable)
      ? shim(element, cmd, ui, arg)
      : exec(cmd, ui, arg);
  }
  
  return wrapper;
}(document.execCommand));

@@ -64,19 +64,17 @@
 = true;%0A
-  
 %0A
+
   functi
@@ -277,27 +277,25 @@
 result;%0A  %7D%0A
-  
 %0A
+
   function g
@@ -479,27 +479,25 @@
 lement;%0A  %7D%0A
-  
 %0A
+
   function r
@@ -569,27 +569,25 @@
 ommand;%0A  %7D%0A
-  
 %0A
+
   function e
@@ -660,27 +660,25 @@
 , arg);%0A  %7D%0A
-  
 %0A
+
   function s
@@ -764,19 +764,17 @@
 ));%0A  %7D%0A
-  
 %0A
+
   functi
@@ -1258,18 +1258,16 @@
 g);%0A  %7D%0A
-  
 %0A  retur

Remove extra whitespace.