Skip to content

Commit 417b0fe

Browse files
Skip urls
1 parent 45c0fe9 commit 417b0fe

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

sphinx_external_toc/collectors.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ def assign_section_numbers(self, env):
6060
self.__alphalower_count = 0
6161
# convert the section numbers to the new style
6262
for _, ref in toctree["entries"]:
63+
# Skip URLs and other refs that aren't documents
64+
if ref not in env.titles:
65+
continue
6366
if "secnumber" in env.titles[ref]:
6467
if style[0] == "numerical":
6568
self.__numerical_count += 1

0 commit comments

Comments
 (0)