Merge pull request #10170 from tk0miya/https_pep_role

The latest docutils converts :pep: role to the "https" URL
This commit is contained in:
Takeshi KOMIYA 2022-02-13 18:44:55 +09:00 committed by GitHub
commit b07ca9dbcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -154,14 +154,15 @@ def get_verifier(verify, verify_re):
@pytest.mark.parametrize('type,rst,html_expected,latex_expected', [ @pytest.mark.parametrize('type,rst,html_expected,latex_expected', [
( (
# pep role # pep role
'verify', 'verify_re',
':pep:`8`', ':pep:`8`',
# since docutils-0.19, :pep: role points to python.org via https schema
('<p><span class="target" id="index-0"></span><a class="pep reference external" ' ('<p><span class="target" id="index-0"></span><a class="pep reference external" '
'href="http://www.python.org/dev/peps/pep-0008"><strong>PEP 8</strong></a></p>'), 'href="https?://www.python.org/dev/peps/pep-0008"><strong>PEP 8</strong></a></p>'),
('\\sphinxAtStartPar\n' (r'\\sphinxAtStartPar\n'
'\\index{Python Enhancement Proposals@\\spxentry{Python Enhancement Proposals}' r'\\index{Python Enhancement Proposals@\\spxentry{Python Enhancement Proposals}'
'!PEP 8@\\spxentry{PEP 8}}\\sphinxhref{http://www.python.org/dev/peps/pep-0008}' r'!PEP 8@\\spxentry{PEP 8}}\\sphinxhref{https?://www.python.org/dev/peps/pep-0008}'
'{\\sphinxstylestrong{PEP 8}}') r'{\\sphinxstylestrong{PEP 8}}')
), ),
( (
# pep role with anchor # pep role with anchor