def soup(self):
        '''
            Running plugins and adding an HTML doctype to the
            generated Tag HTML.
        '''
        dom = BeautifulSoup('<!DOCTYPE html>')

        # BeautifulSoup behaves differently if lxml is installed or not,
        # and will create a basic HTML structure if lxml is installed.
        if len(dom) > 1:
            list(dom.children)[1].replaceWith('')  # Removing default content

        soup = Element.soup(self)
        dom.append(soup)

        for plugin in self.plugins(deduplicate=True):
            dom = plugin(dom)

        return dom
def soup ( self ) : dom = BeautifulSoup ( '<!DOCTYPE html>' ) if len ( dom ) > 1 : list ( dom . children ) [ 1 ] . replaceWith ( '' ) soup = Element . soup ( self ) dom . append ( soup ) for plugin in self . plugins ( deduplicate = True ) : dom = plugin ( dom ) return dom
Running plugins and adding an HTML doctype to the
            generated Tag HTML.