Fixes broken source links in API docs (#9636)
* Fixes broken source links in API docs * Removes illegal blank linepull/9646/head
parent
fc4a21e491
commit
52671842d5
|
@ -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…
Reference in New Issue