mirror of
https://github.com/home-assistant/core.git
synced 2025-08-02 20:25:07 +02: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:
committed by
Paulus Schoutsen
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)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user