1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 06:54:45 +03:00

docs: simplify scheme aliases a bit more

This commit is contained in:
Wez Furlong 2023-03-21 14:48:06 -07:00
parent d2253e8e09
commit cd4a41dfcb
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387

View File

@ -211,15 +211,6 @@ class GenColorScheme(object):
by_prefix[prefix].append(scheme) by_prefix[prefix].append(scheme)
by_name[scheme["name"]] = scheme by_name[scheme["name"]] = scheme
def scheme_link(name):
if name in by_name:
scheme = by_name[name]
prefix = scheme["prefix"]
ident = scheme["ident"]
return f"../{prefix}/index.md#{ident}"
else:
return None
style_filename = f"{self.dirname}/scheme.css" style_filename = f"{self.dirname}/scheme.css"
with open(style_filename, "w") as style_file: with open(style_filename, "w") as style_file:
for scheme in by_name.values(): for scheme in by_name.values():
@ -285,10 +276,6 @@ function load_scheme_player(ident) {{
if len(aliases) > 0: if len(aliases) > 0:
alias_list = [] alias_list = []
for a in aliases: for a in aliases:
alias_link = scheme_link(a)
if alias_link:
alias_list.append(f"[{a}]({alias_link})")
else:
alias_list.append(f"`{a}`") alias_list.append(f"`{a}`")
aliases = ", ".join(alias_list) aliases = ", ".join(alias_list)
idx.write(f"This scheme is also known as {aliases}.<br/>\n") idx.write(f"This scheme is also known as {aliases}.<br/>\n")