Skip to content

Commit a92dd0c

Browse files
committed
Make _add_asset_hashes a no-op with Sphinx 7.1
This makes things work properly with the newest version of Sphinx, which added new functionality.
1 parent f8db95b commit a92dd0c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/furo/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@ def _asset_hash(path: str) -> str:
156156

157157

158158
def _add_asset_hashes(static: List[str], add_digest_to: List[str]) -> None:
159+
if sphinx.version_info >= (7, 1):
160+
# https://github.com/sphinx-doc/sphinx/pull/11415 added the relevant
161+
# functionality to Sphinx, so we don't need to do anything.
162+
return
163+
159164
for asset in add_digest_to:
160165
index = static.index("_static/" + asset)
161166
static[index].filename = _asset_hash(asset) # type: ignore

0 commit comments

Comments
 (0)