Fix resolution of anchor names for kitty @ command docs
This commit is contained in:
parent
c856d5c058
commit
391e2b8488
@ -65,7 +65,7 @@ def resolve_ref(ref: str, website_url: Callable[[str], str] = website_url) -> st
|
|||||||
href = "kittens/" + parts[2] + f'/#{ref}'
|
href = "kittens/" + parts[2] + f'/#{ref}'
|
||||||
elif ref.startswith('at_'):
|
elif ref.startswith('at_'):
|
||||||
base = ref.split('_', 1)[1]
|
base = ref.split('_', 1)[1]
|
||||||
href = "remote-control/#at_" + base.replace('_', '-')
|
href = "remote-control/#at-" + base.replace('_', '-')
|
||||||
elif ref.startswith('action-group-'):
|
elif ref.startswith('action-group-'):
|
||||||
href = f'actions/#{ref}'
|
href = f'actions/#{ref}'
|
||||||
elif prefix == 'action':
|
elif prefix == 'action':
|
||||||
|
|||||||
@ -88,7 +88,7 @@ class TestBuild(BaseTest):
|
|||||||
t('#ref=confloc', f'conf{suffix}#confloc')
|
t('#ref=confloc', f'conf{suffix}#confloc')
|
||||||
t('#ref=conf-kitty-fonts', f'conf{suffix}#conf-kitty-fonts')
|
t('#ref=conf-kitty-fonts', f'conf{suffix}#conf-kitty-fonts')
|
||||||
t('#ref=conf-kitten-ssh-xxx', f'kittens/ssh{suffix}#conf-kitten-ssh-xxx')
|
t('#ref=conf-kitten-ssh-xxx', f'kittens/ssh{suffix}#conf-kitten-ssh-xxx')
|
||||||
t('#ref=at_close_tab', f'remote-control{suffix}#at_close-tab')
|
t('#ref=at_close_tab', f'remote-control{suffix}#at-close-tab')
|
||||||
t('#ref=action-copy', f'actions{suffix}#copy')
|
t('#ref=action-copy', f'actions{suffix}#copy')
|
||||||
t('#ref=doc-/marks', f'marks{suffix}')
|
t('#ref=doc-/marks', f'marks{suffix}')
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user