Skip to content

Commit

Permalink
fix: update the extension if condition (#299)
Browse files Browse the repository at this point in the history
Co-authored-by: Roberto Pastor Muela <[email protected]>
  • Loading branch information
Revathyvenugopal162 and RobPasMue authored Sep 22, 2023
1 parent b383204 commit e18b077
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/ansys_sphinx_theme/extension/linkcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,19 +227,18 @@ def link_code(app: Sphinx, doctree: Node):

# Call user code to resolve the link
try:
# Resolve the URI for source code link
uri = sphinx_linkcode_resolve(
domain=domain,
info=info,
library=library,
source_path=github_source,
github_version=github_version,
)
if not uri:
# no source
continue

if uri in uris or not uri:
# only one link per name, please
# Check if the URI is already processed
if not uri or uri in uris:
# Skip processing if the URI is already in the set
continue
uris.add(uri)

Expand Down

0 comments on commit e18b077

Please sign in to comment.