Parse roles in the help strings

This commit is contained in:
Kovid Goyal
2022-08-14 23:26:56 +05:30
parent c97556de65
commit abaafc2d68
4 changed files with 134 additions and 23 deletions

View File

@@ -29,6 +29,7 @@ is_macos: bool = 'darwin' in _plat
is_freebsd: bool = 'freebsd' in _plat
is_running_from_develop: bool = False
RC_ENCRYPTION_PROTOCOL_VERSION = '1'
website_base_url = 'https://sw.kovidgoyal.net/kitty/'
if getattr(sys, 'frozen', False):
extensions_dir: str = getattr(sys, 'kitty_run_data')['extensions_dir']
@@ -243,7 +244,7 @@ def read_kitty_resource(name: str, package_name: str = 'kitty') -> bytes:
return (files(package_name) / name).read_bytes()
def website_url(doc_name: str = '', website: str = 'https://sw.kovidgoyal.net/kitty/') -> str:
def website_url(doc_name: str = '', website: str = website_base_url) -> str:
if doc_name:
base, _, frag = doc_name.partition('#')
base = base.rstrip('/')