mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-19 15:04:50 +02:00
Remove markup from ref_hyperlink text
This commit is contained in:
@@ -187,6 +187,7 @@ def hostname() -> str:
|
|||||||
def ref_hyperlink(x: str, prefix: str = '') -> str:
|
def ref_hyperlink(x: str, prefix: str = '') -> str:
|
||||||
t, q = text_and_target(x)
|
t, q = text_and_target(x)
|
||||||
url = f'kitty+doc://{hostname()}/#ref={prefix}{q}'
|
url = f'kitty+doc://{hostname()}/#ref={prefix}{q}'
|
||||||
|
t = re.sub(r':([a-z]+):`([^`]+)`', r'\2', t)
|
||||||
return hyperlink_for_url(url, t)
|
return hyperlink_for_url(url, t)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user