add support for non-closed elements at the end of a template