mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-26 02:41:54 +00:00
Hyperlink :envvar: as well
This commit is contained in:
parent
e1c45dc23f
commit
10fdde6647
2 changed files with 3 additions and 3 deletions
|
|
@ -149,7 +149,7 @@ def kbd(x: str) -> str:
|
|||
|
||||
@role
|
||||
def env(x: str) -> str:
|
||||
return italic(x)
|
||||
return ref_hyperlink(x, 'envvar-')
|
||||
|
||||
|
||||
role_map['envvar'] = role_map['env']
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ def resolve_ref(ref: str, website_url: Callable[[str], str] = website_url) -> st
|
|||
elif ref.startswith('action-'):
|
||||
frag = ref.partition('-')[-1].replace('_', '-')
|
||||
href = f'actions/#{frag}'
|
||||
elif ref.startswith('term-'):
|
||||
href = 'glossary/#term-' + ref.partition('-')[-1]
|
||||
elif ref.startswith('term-') or ref.startswith('envvar-'):
|
||||
href = 'glossary/#' + ref
|
||||
return website_url(href)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue