How to use the hotdoc.core.comment.Tag function in hotdoc

To help you get started, we’ve selected a few hotdoc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hotdoc / hotdoc / hotdoc / parsers / gtk_doc.py View on Github external
def __parse_returns_tag(self, name, desc):
        desc, annotations = self.__extract_annotations(desc)
        annotations = {annotation.name: annotation for annotation in
                       annotations}
        return Tag(name, desc, annotations=annotations)
github hotdoc / hotdoc / hotdoc / parsers / gtk_doc.py View on Github external
def __parse_since_tag(self, name, desc):
        return Tag(name, desc, value=desc)
github hotdoc / hotdoc / hotdoc / parsers / gtk_doc.py View on Github external
def __parse_stability_tag(self, name, desc):
        value = desc.strip().lower()
        if value not in ('private', 'stable', 'unstable'):
            # FIXME warn
            return None
        return Tag(name, desc, value=value)
github hotdoc / hotdoc / hotdoc / parsers / gtk_doc.py View on Github external
def __parse_topic_tag(self, name, desc):
        return Tag(name, None, value=desc)
github hotdoc / hotdoc / hotdoc / core / project.py View on Github external
def __add_default_tags(self, _, comment):
        for validator in list(self.tag_validators.values()):
            if validator.default and validator.name not in comment.tags:
                comment.tags[validator.name] = \
                    Tag(name=validator.name,
                        description=validator.default)