mirror of
http://43.156.76.180:8026/YuuMJ/EukPhylo.git
synced 2025-12-27 03:30:25 +08:00
Added optional line to have keys WITHIN names rather than exclusively at start of name
This commit is contained in:
parent
3ec22ac4ac
commit
719ce9bb9d
@ -250,6 +250,9 @@ def color(file, args):
|
||||
for leaf in tree:
|
||||
keys = sorted([key for key in colors if leaf.name.startswith(key)], key = lambda x : -len(x))
|
||||
|
||||
# the line below allows you to have keys anywhere within name and not just start of name.. to use, you have to # the line above
|
||||
#keys = sorted([key for key in colors if key in leaf.name], key=lambda x: -len(x))
|
||||
|
||||
if len(keys) > 0:
|
||||
if '[&!color=' in colors[keys[0]]:
|
||||
leaf_colors.append(leaf.name + colors[keys[0]])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user