fix: throw if a template contains only text nodes

Closes #2