Skip to content

Commit 3414c23

Browse files
committed
Merge pull request astropy#48 from mdboom/edit_on_github_fix
Fix edit_on_github links
2 parents b980003 + fc4044b commit 3414c23

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎astropy_helpers/sphinx/ext/edit_on_github.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,9 @@ def doctree_read(app, doctree):
116116
else:
117117
anchor = '#L%d' % lineno
118118
if anchor:
119+
real_modname = inspect.getmodule(obj).__name__
119120
path = '%s%s%s.py%s' % (
120-
url, source_root, modname.replace('.', '/'), anchor)
121+
url, source_root, real_modname.replace('.', '/'), anchor)
121122
onlynode = addnodes.only(expr='html')
122123
onlynode += nodes.reference(
123124
reftitle=app.config.edit_on_github_help_message,

0 commit comments

Comments
 (0)