Skip to content

Commit

Permalink
Merge pull request #9858 from mattficke/mattficke/update-rfc-subdomain
Browse files Browse the repository at this point in the history
Update RFC base url
  • Loading branch information
tk0miya committed Nov 16, 2021
2 parents ac99e23 + 2ed4bed commit bfe99fa
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions doc/usage/configuration.rst
Expand Up @@ -1005,7 +1005,7 @@ that use Sphinx's HTMLWriter class.
to indicate the location of document using `The Canonical Link Relation`_.
Default: ``''``.

.. _The Canonical Link Relation: https://tools.ietf.org/html/rfc6596
.. _The Canonical Link Relation: https://datatracker.ietf.org/doc/html/rfc6596

.. versionadded:: 1.8

Expand Down Expand Up @@ -2679,7 +2679,7 @@ Options for the linkcheck builder
doubling the wait time between attempts until it succeeds or exceeds the
``linkcheck_rate_limit_timeout``. By default, the timeout is 5 minutes.

.. _Retry-After: https://tools.ietf.org/html/rfc7231#section-7.1.3
.. _Retry-After: https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.3

.. versionadded:: 3.4

Expand Down
2 changes: 1 addition & 1 deletion sphinx/environment/__init__.py
Expand Up @@ -51,7 +51,7 @@
'cloak_email_addresses': True,
'pep_base_url': 'https://www.python.org/dev/peps/',
'pep_references': None,
'rfc_base_url': 'https://tools.ietf.org/html/',
'rfc_base_url': 'https://datatracker.ietf.org/doc/html/',
'rfc_references': None,
'input_encoding': 'utf-8-sig',
'doctitle_xform': False,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_build_html.py
Expand Up @@ -225,9 +225,9 @@ def test_html4_output(app, status, warning):
(".//a[@href='https://www.python.org/dev/peps/pep-0008']"
"[@class='pep reference external']/strong",
'Python Enhancement Proposal #8'),
(".//a[@href='https://tools.ietf.org/html/rfc1.html']"
(".//a[@href='https://datatracker.ietf.org/doc/html/rfc1.html']"
"[@class='rfc reference external']/strong", 'RFC 1'),
(".//a[@href='https://tools.ietf.org/html/rfc1.html']"
(".//a[@href='https://datatracker.ietf.org/doc/html/rfc1.html']"
"[@class='rfc reference external']/strong", 'Request for Comments #1'),
(".//a[@href='objects.html#envvar-HOME']"
"[@class='reference internal']/code/span[@class='pre']", 'HOME'),
Expand Down
10 changes: 5 additions & 5 deletions tests/test_markup.py
Expand Up @@ -36,7 +36,7 @@ def settings(app):
settings.env = app.builder.env
settings.env.temp_data['docname'] = 'dummy'
settings.contentsname = 'dummy'
settings.rfc_base_url = 'http://tools.ietf.org/html/'
settings.rfc_base_url = 'http://datatracker.ietf.org/doc/html/'
domain_context = sphinx_domains(settings.env)
domain_context.enable()
yield settings
Expand Down Expand Up @@ -181,22 +181,22 @@ def get(name):
'verify',
':rfc:`2324`',
('<p><span class="target" id="index-0"></span><a class="rfc reference external" '
'href="http://tools.ietf.org/html/rfc2324.html"><strong>RFC 2324</strong></a></p>'),
'href="http://datatracker.ietf.org/doc/html/rfc2324.html"><strong>RFC 2324</strong></a></p>'),
('\\sphinxAtStartPar\n'
'\\index{RFC@\\spxentry{RFC}!RFC 2324@\\spxentry{RFC 2324}}'
'\\sphinxhref{http://tools.ietf.org/html/rfc2324.html}'
'\\sphinxhref{http://datatracker.ietf.org/doc/html/rfc2324.html}'
'{\\sphinxstylestrong{RFC 2324}}')
),
(
# rfc role with anchor
'verify',
':rfc:`2324#id1`',
('<p><span class="target" id="index-0"></span><a class="rfc reference external" '
'href="http://tools.ietf.org/html/rfc2324.html#id1">'
'href="http://datatracker.ietf.org/doc/html/rfc2324.html#id1">'
'<strong>RFC 2324#id1</strong></a></p>'),
('\\sphinxAtStartPar\n'
'\\index{RFC@\\spxentry{RFC}!RFC 2324\\#id1@\\spxentry{RFC 2324\\#id1}}'
'\\sphinxhref{http://tools.ietf.org/html/rfc2324.html\\#id1}'
'\\sphinxhref{http://datatracker.ietf.org/doc/html/rfc2324.html\\#id1}'
'{\\sphinxstylestrong{RFC 2324\\#id1}}')
),
(
Expand Down

0 comments on commit bfe99fa

Please sign in to comment.