sphinx-contrib / matlabdomain

A Sphinx extension for documenting Matlab code
http://sphinxcontrib-matlabdomain.readthedocs.io/
Other
70 stars 46 forks source link

Fix "can't link function short name if it matches module name" #245

Closed rdzman closed 6 months ago

rdzman commented 8 months ago

Please see if you think this is the correct fix for #243. I didn't get a chance to create a test specifically for this issue, but all of the existing tests pass, and it does fix the particular case I encountered.

And let me know if you need me to create a test before you merge this.

rdzman commented 7 months ago

Please see this comment.

Is there a downside to deleting all of ...

https://github.com/sphinx-contrib/matlabdomain/blob/481134f80be0c84ba1a7c17347d3aefc7a82716d/sphinxcontrib/matlab.py#L261-L267

... instead of the change currently implemented in this PR?

joeced commented 7 months ago

Hi @rdzman thanks for the contribution. On your question in https://github.com/sphinx-contrib/matlabdomain/pull/245#issuecomment-2013553158 I have not had time to test it and will be away from the computer the next week. Sorry about that.

rdzman commented 7 months ago

I just pushed another commit that does completely remove those lines. This is what I'm currently using since it appears to address both #243 and most of the issues in #246.

rdzman commented 7 months ago

I also pushed a commit that addresses an auto-link failure in the context outlined in #243.

rdzman commented 7 months ago

Sorry ... I didn't check closely enough before pushing ... those commits actually broke a lot of things (e.g. lots of links no-longer active). I may have another go at this, but I'm definitely in over my head, so no promises.

rdzman commented 6 months ago

I just rebased this branch on the latest master and omitted the commit/reversal related to #245.

As it stands now, this branch appears to fix #243 for me, but @joeced, you still probably want to have a look to see what you think of the "solution".