a
    ij                     @   s0   d Z ddlmZ ddlmZ eedddZdS )zSyntax highlighting utils.    )epy)resource_utils)codereturnc                 C   s.   t jddd}d}t|}|j|| d}|S )ap  Add Python syntax highlighting to a Python code string.

  Usage:

  Example:

  ```python
  @dataclasses.dataclass
  class A:
    x: int

    def _repr_html_(self) -> str:
      from etils import ecolab  # Lazy-import ecolab

      return ecolab.highlight_html(repr(self))

  ```

  Args:
    code: The string to wrap

  Returns:
    The HTML string representation
  zstatic/highlight.csszetils.ecolab)modulez
  {theme}
  <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script>
  <script>hljs.highlightAll();</script>
  <pre><code class="language-python">{code}</code></pre>
  )themer   )r   Zresource_importr   dedentformat)r   r   html r   Y/home/ghrups/robot-bench/.venv/lib/python3.9/site-packages/etils/ecolab/highlight_util.pyhighlight_html   s    
r   N)__doc__Zetilsr   Zetils.ecolab.inspectsr   strr   r   r   r   r   <module>   s   