reconcile output of htmlparser2's `toString()` with the original document
function ignoreExtraSpaces(string) {
  return string.replace(/(\s+)/g, '\\s+')
    .replace(/(<\\\/)/g, '<\/\\s*')
    .replace(/(<)/g, '<\\s*')
    .replace(/(>)/g, '\\s*>');
}