File: //usr/lib/python3/dist-packages/sphinx/writers/__pycache__/html5.cpython-310.pyc
o
�W�a�� � @ s d Z ddlZddlZddlZddlZddlZddlmZm Z m
Z
mZmZ ddl
mZ ddlmZmZmZ ddlmZ ddlmZ ddlmZ dd lmZmZ dd
lmZmZm Z ddl!m"Z" ddl#m$Z$ dd
l%m&Z& errddl'm(Z( e"�)e*�Z+de,de-de,fdd�Z.G dd� de$e�Z/dS )z�
sphinx.writers.html5
~~~~~~~~~~~~~~~~~~~~
Experimental docutils writers for HTML5 handling Sphinx's custom nodes.
:copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
� N)�
TYPE_CHECKING�Iterable�Set�Tuple�cast)�nodes)�Element�Node�Text)�HTMLTranslator)�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$ �6/usr/lib/python3/dist-packages/sphinx/writers/html5.py�multiply_length( s r&