File: //usr/lib/python3/dist-packages/sphinx/writers/__pycache__/html.cpython-310.pyc
o
�$�aG� � @ s: d Z ddlZddlZddlZddlZddlZddlZddlm Z m
Z
mZmZ ddl
mZ ddlmZmZmZ ddlmZ ddlmZ ddlmZ dd lmZ dd
lmZmZ ddlmZm Z m!Z! ddl"m#Z# dd
l$m%Z% ddl&m'Z' e rzddl(m)Z) e#�*e+�Z,de-de.de-fdd�Z/G dd� de�Z0G dd� de%e�ZdS )z�
sphinx.writers.html
~~~~~~~~~~~~~~~~~~~
docutils writers handling Sphinx' custom nodes.
:copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
� N)�
TYPE_CHECKING�Iterable�Tuple�cast)�nodes)�Element�Node�Text)�HTMLTranslator)�Writer)�addnodes)�Builder)�RemovedInSphinx50Warning�RemovedInSphinx60Warning)�_�__�admonitionlabels)�logging)�SphinxTranslator)�get_image_size)�StandaloneHTMLBuilder�length�scale�returnc C sL t �d| �}|s
| S |dkr| S |�� \}}t|�| d }dt|�|f S )z/Multiply *length* (width or height) by *scale*.z^(\d*\.?\d*)\s*(\S*)$�d z%s%s)�re�match�groups�float�int)r r �matched�amount�unit�result� r$ �5/usr/lib/python3/dist-packages/sphinx/writers/html.py�multiply_length* s r&