Skip to content

Commit

Permalink
fix: html_domain_indices should be False during prepare_writing
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverRainZ committed Jul 9, 2024
1 parent 53e98f1 commit a3115f8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/sphinxnotes/fasthtml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,14 @@ def _overwrite_config(self) -> None:
Should be called before builder.Builder.read().
"""
self._old_config = {}
def overwrite(name, val, optional=False):
def overwrite(name, val, optional=False, restore=True):
if optional and not hasattr(self.config, name):
return
self._old_config[name] = getattr(self.config, name)
if restore:
self._old_config[name] = getattr(self.config, name)
setattr(self.config, name, val)

overwrite('html_domain_indices', False)
overwrite('html_domain_indices', False, restore=False)
# Do not build mo files.
overwrite('gettext_auto_build', False)
# Prevent intersphinx cache expiration.
Expand Down

0 comments on commit a3115f8

Please sign in to comment.