From a3115f8c8d757692ea772cde2ca8d2ffc434527a Mon Sep 17 00:00:00 2001 From: Shengyu Zhang Date: Wed, 10 Jul 2024 00:19:17 +0800 Subject: [PATCH] fix: html_domain_indices should be False during prepare_writing --- src/sphinxnotes/fasthtml/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/sphinxnotes/fasthtml/__init__.py b/src/sphinxnotes/fasthtml/__init__.py index bae86bf..aff8afc 100644 --- a/src/sphinxnotes/fasthtml/__init__.py +++ b/src/sphinxnotes/fasthtml/__init__.py @@ -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.