src/language-handlebars/parser-glimmer.js/removeEmptyNodes
function removeEmptyNodes(node) {
  return (
    node.type !== "TextNode" ||
    (node.type === "TextNode" &&
      node.chars.replace(/^\s+/, "").replace(/\s+$/, "") !== "")
  );
}