<html>
body
p Indenting the body tag here would make no difference.
p HTML itself isn't whitespace-sensitive.
</html>
the individual lines of HTML cannot be parsed as valid HTML individually, which makes them tricky to parse into vdom nodes. Basically we would need to parse HTML text as we go, keeping track of opened tags and eventually appending nodes created within them once we encounter closing tags.
What sucks is we may need to also support
- var myOpeningTag = '<div>';
- var myClosingTag = '</div>';
| !{myOpeningTag}
body
p Indenting the body tag here would make no difference.
p HTML itself isn't whitespace-sensitive.
| !{myClosingTag}
which means the HTML parsing would have to happen at runtime. We should do some experiments with pug to be sure we are recreating the features correctly.
This example, demonstrated at https://pugjs.org/language/plain-text.html#literal-html is a problem:
the individual lines of HTML cannot be parsed as valid HTML individually, which makes them tricky to parse into vdom nodes. Basically we would need to parse HTML text as we go, keeping track of opened tags and eventually appending nodes created within them once we encounter closing tags.
What sucks is we may need to also support
which means the HTML parsing would have to happen at runtime. We should do some experiments with pug to be sure we are recreating the features correctly.