Fix building of docs

This commit is contained in:
Kovid Goyal 2021-11-22 20:02:18 +05:30
parent 9ce807069a
commit c5af9613fd
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 4 deletions

View File

@ -56,7 +56,7 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- broadcast kitten: Show a "fake" cursor in all windows being broadcast too
(:iss:`4225`)
- Allow defining aliases for more general actions, not just kittens
- Allow defining :opt:`aliases <action_alias>` for more general actions, not just kittens
(:pull:`4260`)
- Fix a regression that caused :option:`kitty --title` to not work when

View File

@ -49,14 +49,15 @@ def remove_markup(text: str) -> str:
'watchers': f'{website_url("launch")}#watchers',
'sessions': f'{website_url("overview")}#startup-sessions',
'functional': f'{website_url("keyboard-protocol")}#functional-key-definitions',
'action-select_tab': f'{website_url("actions")}#select-tab',
'action-close_window_with_confirmation': f'{website_url("actions")}#close-window-with-confirmation',
'shell_integration': website_url("shell-integration"),
}
for ac in ('launch', 'select_tab', 'shell_integration', 'close_window_with_confirmation', 'kitten', 'remote_control'):
ref_map[f'action-{ac}'] = f'{website_url("actions")}#' + ac.replace('_', '-')
def sub(m: 'Match[str]') -> str:
if m.group(1) == 'ref':
return ref_map[m.group(2)]
q = m.group(2).split('<')[-1].rstrip('>')
return ref_map[q]
return str(m.group(2))
return re.sub(r':([a-zA-Z0-9]+):`(.+?)`', sub, text, flags=re.DOTALL)