Skip to content

Commit

Permalink
[htmlhelp] do not add checksums to css files if building using the ht…
Browse files Browse the repository at this point in the history
…mlhelp builder (#11894)

Co-authored-by: Jan-Hendrik Garber <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
  • Loading branch information
3 people committed Mar 15, 2024
1 parent 98d0cc8 commit 7bd9c59
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ Bugs fixed
* #11278: autodoc: Fix rendering of :class:`functools.singledispatchmethod`
combined with :func:`@classmethod <classmethod>`.
Patch by Bénédikt Tran.
* #11894: Do not add checksums to css files if building using the htmlhelp builder.
Patch by mkay.

Testing
-------
Expand Down
4 changes: 3 additions & 1 deletion sphinx/builders/html/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,9 @@ def css_tag(css: _CascadingStyleSheet) -> str:
if value is not None]
uri = pathto(os.fspath(css.filename), resource=True)
# the EPUB format does not allow the use of query components
if self.name != 'epub':
# the Windows help compiler requires that css links
# don't have a query component
if self.name not in {'epub', 'htmlhelp'}:
if checksum := _file_checksum(outdir, css.filename):
uri += f'?v={checksum}'
return f'<link {" ".join(sorted(attrs))} href="{uri}" />'
Expand Down

0 comments on commit 7bd9c59

Please sign in to comment.