From e010998a117ed3d060382310cd57e6bb12a01ad7 Mon Sep 17 00:00:00 2001 From: James Knight Date: Sat, 12 Oct 2024 14:15:57 -0400 Subject: [PATCH] builder: correct title track database check When processing doctree targets to track titles across multiple documents, the check for the database would fail to function if the database did not any initial entries. This would properly prevent tracking conflicting title documents when running with a `singleconfluence` builder. Adjusting the check to ignore/suppress if the provided database entry is `None`. Signed-off-by: James Knight --- sphinxcontrib/confluencebuilder/builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinxcontrib/confluencebuilder/builder.py b/sphinxcontrib/confluencebuilder/builder.py index b76f6128..1ae99baf 100644 --- a/sphinxcontrib/confluencebuilder/builder.py +++ b/sphinxcontrib/confluencebuilder/builder.py @@ -1192,7 +1192,7 @@ def _register_doctree_targets(self, docname, doctree, title_track=None): # Prepare a database to track titles if one is not already provided. # (i.e. not all callers care about unique targets between multiple # documents) - title_track = title_track if title_track else {} + title_track = title_track if title_track is not None else {} # Find the first section of this document page. It will be used to # create "base" line to a specific page embedded in the single