Skip to content

Commit

Permalink
Update src/sphinx_book_theme/__init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 authored Dec 12, 2023
1 parent 5e38c7b commit 5c7dc45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sphinx_book_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def hash_assets_for_files(assets: list, theme_static: Path, context, app):
f"Asset {asset_source_path} does not exist, not linking."
)
# Find this asset in context, and update it to include the digest
for i, other_asset in enumerate(context[asset_type]):
for ii, other_asset in enumerate(context[asset_type]):
# TODO: eventually the contents of context['css_files'] etc should probably
# only be _CascadingStyleSheet etc. For now, assume mixed with strings.
if (
Expand All @@ -111,7 +111,7 @@ def hash_assets_for_files(assets: list, theme_static: Path, context, app):
# Take priority from existing asset or use default priority (500)
priority = getattr(other_asset, "priority", 500)
# Remove existing asset
del context[asset_type][i]
del context[asset_type][ii]
# Add new asset
app.add_css_file(
asset_sphinx_link,
Expand Down

0 comments on commit 5c7dc45

Please sign in to comment.