code: function squashTrailingWhitespace(nextTag) {
      var charsIndex = buffer.length - 1;
      if (buffer.length > 1) {
        var item = buffer[buffer.length - 1];
        if (/^(?:<!|$)/.test(item) && item.indexOf(uidIgnore) === -1) {
          charsIndex--;
        }
      }
      trimTrailingWhitespace(charsIndex, nextTag);
    }
docs: look for trailing whitespaces from previously processed text which may not be trimmed due to a following comment or an empty element which has now been removed