docs: function expandRangeToSurround(range) {
        if (range.canSurroundContents()) return;
  
        var common = range.commonAncestorContainer,
            start_depth = getDepth(common, range.startContainer),
            end_depth = getDepth(common, range.endContainer);
  
        while(!range.canSurroundContents()) {
          // In the following branches, we cannot just decrement the depth variables because the setStartBefore/setEndAfter may move the start or end of the range more than one level relative to ``common``. So we need to recompute the depth.
          if (start_depth > end_depth) {
              range.setStartBefore(range.startContainer);
              start_depth = getDepth(common, range.startContainer);
          }
          else {
              range.setEndAfter(range.endContainer);
              end_depth = getDepth(common, range.endContainer);
          }
        }
    }