mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
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
@ -117,7 +117,11 @@ def linkcode_resolve(domain, info):
|
|||||||
linespec = "#L%d" % (lineno + 1)
|
linespec = "#L%d" % (lineno + 1)
|
||||||
else:
|
else:
|
||||||
linespec = ""
|
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)
|
return '{}/blob/{}/{}{}'.format(GITHUB_URL, code_branch, fn, linespec)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user