Skip to content

Commit

Permalink
Fix "can't link function short name if it matches module name" sphinx…
Browse files Browse the repository at this point in the history
  • Loading branch information
rdzman committed May 3, 2024
1 parent fc28175 commit 0b92fb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sphinxcontrib/matlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def get_index_text(self, modname, name):
def add_target_and_index(self, name_cls, sig, signode):
modname = self.options.get("module", self.env.temp_data.get("mat:module"))

if self.env.config.matlab_short_links:
if self.env.config.matlab_short_links and not name_cls[0] == modname:
# modname is only used for package names
# - "target.+package" => "package"
# - "target" => ""
Expand Down

0 comments on commit 0b92fb1

Please sign in to comment.