Fixes broken source links in API docs (#9636)
* Fixes broken source links in API docs * Removes illegal blank line
This commit is contained in:
parent
fc4a21e491
commit
52671842d5
1 changed files with 5 additions and 1 deletions
|
@ -117,7 +117,11 @@ def linkcode_resolve(domain, info):
|
|||
linespec = "#L%d" % (lineno + 1)
|
||||
else:
|
||||
linespec = ""
|
||||
fn = relpath(fn, start='../')
|
||||
index = fn.find("/homeassistant/")
|
||||
if index == -1:
|
||||
index = 0
|
||||
|
||||
fn = fn[index:]
|
||||
|
||||
return '{}/blob/{}/{}{}'.format(GITHUB_URL, code_branch, fn, linespec)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue