o
    j6h                     @  s6   d Z ddlmZ ddlmZ ddlmZ dd
dZdS )zUtilities for generating HTML.    )annotations)ElementTree)	sheets_idurlsheets_id.SheetsURLtextstrreturnc                 C  s8   t jdddt| dd}|r|nd|_t j|ddd	S )
a  Returns a HTML string representing an anchor tag.

    This class uses the xml.etree library to handle HTML escaping.

    Args:
      url: The Sheets URL to link to.
      text: The text body of the link.

    Returns:
      A string representing a HTML fragment.
    a_blanknoopener)targetrelhref)attriblinkunicodehtml)encodingmethod)r   Elementr   r   tostring)r   r   tag r   v/var/www/html/chefvision.cloud.itp360.com/venv/lib/python3.10/site-packages/google/generativeai/notebook/html_utils.pyget_anchor_tag   s   r   N)r   r   r   r   r	   r   )__doc__
__future__r   	xml.etreer   google.generativeai.notebookr   r   r   r   r   r   <module>   s
   