| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,6 +4,7 @@ | |||
| 4 | 4 | from pathlib import Path | |
| 5 | 5 | from typing import Any, Dict, List | |
| 6 | 6 | ||
| 7 | + import sphinx | ||
| 7 | 8 | import sphinx.application | |
| 8 | 9 | from sphinx.builders.html import StandaloneHTMLBuilder | |
| 9 | 10 | ||
@@ -20,6 +21,11 @@ def _asset_hash(path: str) -> str: | |||
| 20 | 21 | ||
| 21 | 22 | ||
| 22 | 23 | def _add_asset_hashes(static: List[str], add_digest_to: List[str]) -> None: | |
| 24 | + if sphinx.version_info >= (7, 1): | ||
| 25 | + # https://github.com/sphinx-doc/sphinx/pull/11415 added the relevant | ||
| 26 | + # functionality to Sphinx, so we don't need to do anything. | ||
| 27 | + return | ||
| 28 | + | ||
| 23 | 29 | for asset in add_digest_to: | |
| 24 | 30 | index = static.index(asset) | |
| 25 | 31 | static[index].filename = _asset_hash(asset) # type: ignore | |
| Back | FazBrowse Home | New Git URL |
0 commit comments