code: function(text) {
    if (text.indexOf('\t') == -1) {
      return text;
    } else {
      var lastStop = 0;
      return text.replace(reAllTab, function(match, offset) {
        var result = '    '.slice((offset - lastStop) % 4);
        lastStop = offset + 1;
        return result;
      });
    }
  }
docs: Convert tabs to spaces on each line using a 4-space tab stop.