Hyperlink :envvar: as well
This commit is contained in:
parent
e1c45dc23f
commit
10fdde6647
@ -149,7 +149,7 @@ def kbd(x: str) -> str:
|
|||||||
|
|
||||||
@role
|
@role
|
||||||
def env(x: str) -> str:
|
def env(x: str) -> str:
|
||||||
return italic(x)
|
return ref_hyperlink(x, 'envvar-')
|
||||||
|
|
||||||
|
|
||||||
role_map['envvar'] = role_map['env']
|
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-'):
|
elif ref.startswith('action-'):
|
||||||
frag = ref.partition('-')[-1].replace('_', '-')
|
frag = ref.partition('-')[-1].replace('_', '-')
|
||||||
href = f'actions/#{frag}'
|
href = f'actions/#{frag}'
|
||||||
elif ref.startswith('term-'):
|
elif ref.startswith('term-') or ref.startswith('envvar-'):
|
||||||
href = 'glossary/#term-' + ref.partition('-')[-1]
|
href = 'glossary/#' + ref
|
||||||
return website_url(href)
|
return website_url(href)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user