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:
parent
d2253e8e09
commit
cd4a41dfcb
@ -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,11 +276,7 @@ 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)
|
alias_list.append(f"`{a}`")
|
||||||
if alias_link:
|
|
||||||
alias_list.append(f"[{a}]({alias_link})")
|
|
||||||
else:
|
|
||||||
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")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user