Backport upstream patch for fix build error

This commit is contained in:
liwenjun@kylinos.cn 2024-10-17 17:45:01 +08:00
parent 254a3c0d6c
commit cf7b9eea08
2 changed files with 10 additions and 1 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
sphinx-rtd-theme (2.0.0+dfsg-ok2) nile; urgency=medium
* Backport upstream patch for fix build error.
-- liwenjun <liwenjun@kylinos.cn> Thu, 17 Oct 2024 17:42:19 +0800
sphinx-rtd-theme (2.0.0+dfsg-ok1) nile; urgency=medium
* Build for openKylin.

View File

@ -37,10 +37,13 @@ def test_basic():
)
assert search in content
elif isinstance(app.builder, SingleFileHTMLBuilder):
internal_ref = '#document-foo'
if sphinx.version_info[:3] < (7, 3, 0):
internal_ref = 'index.html' + internal_ref
search = (
'<ul>\n'
'<li class="toctree-l1">'
'<a class="reference internal" href="index.html#document-foo">foo</a>'
f'<a class="reference internal" href="{internal_ref}">foo</a>'
'</li>\n'
'</ul>'
)