Hyperlink doc text role

This commit is contained in:
pagedown
2022-08-24 13:29:07 +08:00
parent 9a70709bba
commit ba9afc61a4

View File

@@ -168,7 +168,9 @@ def file(x: str) -> str:
@role
def doc(x: str) -> str:
return website_url(x)
t, q = text_and_target(x)
url = f'kitty+doc://{hostname()}/{q.lstrip("/")}'
return hyperlink_for_url(url, t)
@run_once