# File lib/cgikit/parser.rb, line 535
    def end_doctype
      if REXML::Parsers::BaseParser::DOCTYPE_START =~ @buf.last
        # There is no `markupdecl`

        s = @buf.pop
        ss = s.sub(/\[\z/um, '>')
        @buf << ss
      else
        @buf << ']>' 
      end
    end