Hyperlink :envvar: as well
This commit is contained in:
parent
e1c45dc23f
commit
10fdde6647
@ -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…
x
Reference in New Issue
Block a user