docs: function trimWhitespace(line) {
    let whitespaceIndicies = [];
    let allWhitespace = true;
    let seenAnyTag = false;
    let newLine = new Array(line.length);
    for (let i = 0; i < line.length; i++) {
      let obj = line[i];
      newLine[i] = obj;
      if (typeof obj === 'string') {
        if (!nonWhitespace.test(obj)) {
          whitespaceIndicies.push(i);
        } else {
          allWhitespace = false;
        }
      } else {
        seenAnyTag = true;
        if (nonWhitespaceNodes[obj.type] === true) {
          allWhitespace = false;
        }
      }
      // Bail out if we've seen a non-whitespace
      if (!allWhitespace) {
        return line;
      }
    }
  
    // Remove the whitespace nodes if this line consists of:
    //  - only whitespace text
    //  - no Interpolators or Unescaped Interpolators
    //  - at least one Mustache tag
    if (allWhitespace && seenAnyTag) {
      for (let i = 0; i < whitespaceIndicies.length; i++) {
        let index = whitespaceIndicies[i];
        let obj = newLine[index];
        newLine[index] = {
          type: types.TEXT,
          original: obj,
          length: obj.length
        };
      }
    }
  
    return newLine;
  }