asciidoxy/generator/asciidoc.py
def link(self,
             name: str,
             *,
             kind: Optional[str] = None,
             lang: Optional[str] = None,
             text: Optional[str] = None,
             full_name: bool = False,
             allow_overloads: bool = True) -> str:
        """Insert a link to API reference documentation.

        Only `name` is mandatory. Multiple names may match the same name. Use `kind` and `lang` to
        disambiguate.

        Args:
            name:            Fully qualified name of the object to link to.
            kind:            Kind of object to link to.
            lang:            Programming language of the object.
            text:            Alternative text to use for the link. If not supplied, the object name
                                 is used.
            full_name:       Use the fully qualified name of the object for the link text.
            allow_overloads: Link to the first match in an overload set. Enabled by default.

        Returns:
            AsciiDoc text to include in the document.
        """
        if text is not None and full_name is True:
            raise ValueError("`text` and `full_name` cannot be used together.")

        try:
            element = self.find_element(name, kind=kind, lang=lang, allow_overloads=allow_overloads)
        except ReferenceNotFoundError as ref_not_found:
            if self._context.warnings_are_errors:
                raise
            else:
                logger.warning(str(ref_not_found))
                return text or name

        if element.id is None:
            unlinkable = UnlinkableError(name, lang=lang, kind=kind)
            if self._context.warnings_are_errors:
                raise unlinkable
            else:
                logger.warning(str(unlinkable))
                return text or name

        if text is not None:
            link_text = text
        elif full_name:
            link_text = name
        else:
            link_text = element.name

        return self._context.link_to_element(element.id, link_text, element)
Insert a link to API reference documentation.

        Only `name` is mandatory. Multiple names may match the same name. Use `kind` and `lang` to
        disambiguate.

        Args:
            name:            Fully qualified name of the object to link to.
            kind:            Kind of object to link to.
            lang:            Programming language of the object.
            text:            Alternative text to use for the link. If not supplied, the object name
                                 is used.
            full_name:       Use the fully qualified name of the object for the link text.
            allow_overloads: Link to the first match in an overload set. Enabled by default.

        Returns:
            AsciiDoc text to include in the document.
        
Insert a link to API reference documentation.
Only `name` is mandatory. Multiple names may match the same name. Use `kind` and `lang` to
disambiguate.
Insert a link to API reference documentation . Only ` name ` is mandatory . Multiple names may match the same name . Use ` kind ` and ` lang ` to disambiguate .
def link(self,
             name: str,
             *,
             kind: Optional[str] = None,
             lang: Optional[str] = None,
             text: Optional[str] = None,
             full_name: bool = False,
             allow_overloads: bool = True) -> str:
        if text is not None and full_name is True:
            raise ValueError("`text` and `full_name` cannot be used together.")
        try:
            element = self.find_element(name, kind=kind, lang=lang, allow_overloads=allow_overloads)
        except ReferenceNotFoundError as ref_not_found:
            if self._context.warnings_are_errors:
                raise
            else:
                logger.warning(str(ref_not_found))
                return text or name
        if element.id is None:
            unlinkable = UnlinkableError(name, lang=lang, kind=kind)
            if self._context.warnings_are_errors:
                raise unlinkable
            else:
                logger.warning(str(unlinkable))
                return text or name
        if text is not None:
            link_text = text
        elif full_name:
            link_text = name
        else:
            link_text = element.name
        return self._context.link_to_element(element.id, link_text, element)
def link ( self , name : str , * , kind : Optional [ str ] = None , lang : Optional [ str ] = None , text : Optional [ str ] = None , full_name : bool = False , allow_overloads : bool = True ) -> str : if text is not None and full_name is True : raise ValueError ( "`text` and `full_name` cannot be used together." ) try : element = self . find_element ( name , kind = kind , lang = lang , allow_overloads = allow_overloads ) except ReferenceNotFoundError as ref_not_found : if self . _context . warnings_are_errors : raise else : logger . warning ( str ( ref_not_found ) ) return text or name if element . id is None : unlinkable = UnlinkableError ( name , lang = lang , kind = kind ) if self . _context . warnings_are_errors : raise unlinkable else : logger . warning ( str ( unlinkable ) ) return text or name if text is not None : link_text = text elif full_name : link_text = name else : link_text = element . name return self . _context . link_to_element ( element . id , link_text , element )
Insert a link to API reference documentation.
Insert a link to API reference documentation .
"""Insert a link to API reference documentation.

        Only `name` is mandatory. Multiple names may match the same name. Use `kind` and `lang` to
        disambiguate.

        Args:
            name:            Fully qualified name of the object to link to.
            kind:            Kind of object to link to.
            lang:            Programming language of the object.
            text:            Alternative text to use for the link. If not supplied, the object name
                                 is used.
            full_name:       Use the fully qualified name of the object for the link text.
            allow_overloads: Link to the first match in an overload set. Enabled by default.

        Returns:
            AsciiDoc text to include in the document.
        """
AsciiDoc text to include in the document.
AsciiDoc text to include in the document .
self
name
str
Fully qualified name of the object to link to.
Fully qualified name of the object to link to .
kind
Optional[str]
Kind of object to link to.
Kind of object to link to .
lang
Optional[str]
Programming language of the object.
Programming language of the object .
text
Optional[str]
Alternative text to use for the link. If not supplied, the object name
is used.
Alternative text to use for the link . If not supplied the object name is used .
full_name
bool
Use the fully qualified name of the object for the link text.
Use the fully qualified name of the object for the link text .
allow_overloads
bool
Link to the first match in an overload set. Enabled by default.
Link to the first match in an overload set . Enabled by default .