| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.9/site-packages/sphinx/ext/__pycache__/ |
Upload File : |
a
�ab� � @ s d Z ddlZddlZddlmZmZmZmZ ddlm Z m
Z
ddlmZm
Z
ddlmZ ddlZddlmZ ddlmZ dd lmZ dd
lmZ ddlmZ ddlmZ dd
lmZ e�e �Z!G dd� de�Z"e#e#e#ed�dd�Z$edd�dd�Z%eee#ef d�dd�Z&dS )a�
sphinx.ext.extlinks
~~~~~~~~~~~~~~~~~~~
Extension to save typing and prevent hard-coding of base URLs in the reST
files.
This adds a new config value called ``extlinks`` that is created like this::
extlinks = {'exmpl': ('https://example.invalid/%s.html', caption), ...}
Now you can use e.g. :exmpl:`foo` in your documents. This will create a
link to ``https://example.invalid/foo.html``. The link caption depends on
the *caption* value given:
- If it is ``None``, the caption will be the full URL.
- If it is a string, it must contain ``%s`` exactly once. In this case the
caption will be *caption* with the role content substituted for ``%s``.
You can also give an explicit caption, e.g. :exmpl:`Foo <foo>`.
Both, the url string and the caption string must escape ``%`` as ``%%``.
:copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
� N)�Any�Dict�List�Tuple)�nodes�utils)�Node�system_message)�Inliner)�Sphinx)�RemovedInSphinx60Warning)�__)�SphinxPostTransform)�logging)�split_explicit_title)�RoleFunctionc @ s6 e Zd ZdZdZedd�dd�Zejdd�dd �Z dS )
�ExternalLinksCheckerz�
For each external link, check if it can be replaced by an extlink.
We treat each ``reference`` node without ``internal`` attribute as an external link.
i� N)�kwargs�returnc K s"