Skip to content

Commit 946213f

Browse files
committed
Fix "can't link function short name if it matches module name" sphinx-contrib#243.
1 parent 481134f commit 946213f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sphinxcontrib/matlab.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def get_index_text(self, modname, name):
258258
def add_target_and_index(self, name_cls, sig, signode):
259259
modname = self.options.get("module", self.env.temp_data.get("mat:module"))
260260

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

0 commit comments

Comments
 (0)