throw syntax error if you write text after closed tag

issue #333