def formatTagSection(self, blocktags, italic=False):
        text = ""
        def formatTextContent(content):
            text = ""
            for something in content:
                if isinstance(something, basestring):
                    text += something
                elif something.getLink():
                    text += self.formatLink(something.getLink())
            return text

        authorTag = [blocktag for blocktag in blocktags if blocktag.getName() == "author"]
        if len(authorTag) > 0:
            text += "###### Authored by {}\n\n".format(self.formatText(authorTag[0].getText()))
        versionTag = [blocktag for blocktag in blocktags if blocktag.getName() == "version"]
        if len(versionTag) > 0:
            text += "Version {}\n\n".format(self.formatText(versionTag[0].getText()))
        paramTags = [blocktag for blocktag in blocktags if blocktag.getName() == "param"]
        if len(paramTags) > 0:
            text += "**params**\n\n"
            for paramTag in paramTags:
                content = paramTag.getText().getContent()
                if len(content) > 0:
                    first = re.split('\s+', content[0])
                    var = first[0]
                    text += "* `{}` - {}{}\n".format(var, ' '.join(first[1:]), formatTextContent(content[1:]))
        returnTag = [blocktag for blocktag in blocktags if blocktag.getName() == "return"]
        if len(returnTag) > 0:
            content = returnTag[0].getText().getContent()
            if len(content) > 0:
                text += "\n**returns** {}\n\n".format(formatTextContent(content))
        throwsTags = [blocktag for blocktag in blocktags if blocktag.getName() == "throws"]
        if len(throwsTags) > 0:
            text += "**throws**\n\n"
            for throwsTag in throwsTags:
                content = throwsTag.getText().getContent()
                if len(content) > 0:
                    first = re.split('\s+', content[0])
                    typ = first[0]
                    text += "* `{}` {}{}\n".format(typ, ' '.join(first[1:]), formatTextContent(content[1:]))
        seeTags = [blocktag for blocktag in blocktags if blocktag.getName() == "see"]
        if len(seeTags) > 0:
            text += "**see**\n\n"
            for seeTag in seeTags:
                content = seeTag.getText().getContent()
                if len(content) > 0:
                    text += "* {}\n".format(formatTextContent(content))
        sinceTag = [blocktag for blocktag in blocktags if blocktag.getName() == "since"]
        if len(sinceTag) > 0:
            text += "\n**since** {}\n\n".format(self.formatText(sinceTag[0].getText()))
        deprecatedTag = [blocktag for blocktag in blocktags if blocktag.getName() == "deprecated"]
        if len(deprecatedTag) > 0:
            content = deprecatedTag.getText().getContent()
            if len(content) > 0:
                text += "~~deprecated~~ {}\n\n".format(formatTextContent(content))
        return text
dataset/ETHPy150Open mgottein/github-doc/wikibuilder.py/Wiki.formatTagSection/original