luaprettydoc/luafile.py
def create_metadata(self, meta: list, name: str) -> None:
        """Create the Metadata for Markdown Output"""

        module_type, module_name, module_brief = None, None, None

        for metadata in meta:
            if CommentTag.COMMENT_TAG_HEADER in metadata:
                module_type = get_tag_line(metadata, 1)
            elif CommentTag.COMMENT_TAG_NAME in metadata:
                module_name = get_tag_line(metadata, 1) or name
            elif CommentTag.COMMENT_TAG_BRIEF in metadata:
                module_brief = get_tag_line(metadata, 1)

        if not self.is_metadata_valid(module_type):
            module_type = MetadataType.METADATA_TYPE_MODULE

        self.module = f"{module_type} {module_name}"
        self.buffer = Templates.TEMPLATE_START.format(
            self.module, module_brief)
Create the Metadata for Markdown Output
Create the Metadata for Markdown Output
Create the Metadata for Markdown Output
def create_metadata(self, meta: list, name: str) -> None:
        module_type, module_name, module_brief = None, None, None
        for metadata in meta:
            if CommentTag.COMMENT_TAG_HEADER in metadata:
                module_type = get_tag_line(metadata, 1)
            elif CommentTag.COMMENT_TAG_NAME in metadata:
                module_name = get_tag_line(metadata, 1) or name
            elif CommentTag.COMMENT_TAG_BRIEF in metadata:
                module_brief = get_tag_line(metadata, 1)
        if not self.is_metadata_valid(module_type):
            module_type = MetadataType.METADATA_TYPE_MODULE
        self.module = f"{module_type} {module_name}"
        self.buffer = Templates.TEMPLATE_START.format(
            self.module, module_brief)
def create_metadata ( self , meta : list , name : str ) -> None : module_type , module_name , module_brief = None , None , None for metadata in meta : if CommentTag . COMMENT_TAG_HEADER in metadata : module_type = get_tag_line ( metadata , 1 ) elif CommentTag . COMMENT_TAG_NAME in metadata : module_name = get_tag_line ( metadata , 1 ) or name elif CommentTag . COMMENT_TAG_BRIEF in metadata : module_brief = get_tag_line ( metadata , 1 ) if not self . is_metadata_valid ( module_type ) : module_type = MetadataType . METADATA_TYPE_MODULE self . module = f"{module_type} {module_name}" self . buffer = Templates . TEMPLATE_START . format ( self . module , module_brief )
Create the Metadata for Markdown Output
Create the Metadata for Markdown Output
"""Create the Metadata for Markdown Output"""
self
meta
list
name
str