Skip to content

Commit 7bd9c59

Browse files
mkay-shJan-Hendrik GarberAA-Turner
authored
[htmlhelp] do not add checksums to css files if building using the htmlhelp builder (#11894)
Co-authored-by: Jan-Hendrik Garber <jan-hendrik.garber@avanquest.com> Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
1 parent 98d0cc8 commit 7bd9c59

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ Bugs fixed
9696
* #11278: autodoc: Fix rendering of :class:`functools.singledispatchmethod`
9797
combined with :func:`@classmethod <classmethod>`.
9898
Patch by Bénédikt Tran.
99+
* #11894: Do not add checksums to css files if building using the htmlhelp builder.
100+
Patch by mkay.
99101

100102
Testing
101103
-------

sphinx/builders/html/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,9 @@ def css_tag(css: _CascadingStyleSheet) -> str:
10521052
if value is not None]
10531053
uri = pathto(os.fspath(css.filename), resource=True)
10541054
# the EPUB format does not allow the use of query components
1055-
if self.name != 'epub':
1055+
# the Windows help compiler requires that css links
1056+
# don't have a query component
1057+
if self.name not in {'epub', 'htmlhelp'}:
10561058
if checksum := _file_checksum(outdir, css.filename):
10571059
uri += f'?v={checksum}'
10581060
return f'<link {" ".join(sorted(attrs))} href="{uri}" />'

0 commit comments

Comments
 (0)