# File lib/html5/html5parser/in_body_phase.rb, line 332
    def endTagP(name)
      @tree.generateImpliedEndTags('p') if in_scope?('p')
      parse_error("unexpected-end-tag", {"name" => "p"}) unless @tree.open_elements.last.name == 'p'
      if in_scope?('p')
        @tree.open_elements.pop while in_scope?('p')
      else
        startTagCloseP('p', {})
        endTagP('p')
      end
    end