Skip to content
Snippets Groups Projects
Commit d701a755 authored by François  LAURENT's avatar François LAURENT
Browse files

#55: _large-suffixed tags detected together with their suffix-free variants

parent 411abf2a
No related branches found
No related tags found
No related merge requests found
Pipeline #89709 passed
...@@ -158,13 +158,19 @@ function tryopenfile(controller, path; reload::Bool=false) ...@@ -158,13 +158,19 @@ function tryopenfile(controller, path; reload::Bool=false)
) )
fallback_color = theme[:LarvaPlot][:fallback_color] fallback_color = theme[:LarvaPlot][:fallback_color]
existingtags = records.tags existingtags = records.tags
# following issue #55, we need to identify situations where _large-suffixed
# tags are found together with their suffix-free variants
apply_default_convention = false apply_default_convention = false
for tag in existingtags for tag in existingtags
if tag in keys(default_convention) if tag in keys(default_convention)
apply_default_convention = true variant, suffix = rsplit(string(tag), '_'; limit=2)
break if suffix == "large" && Symbol(variant) in existingtags
apply_default_convention = true
break
end
end end
end end
#
for tag in existingtags for tag in existingtags
active′= tag in keys(default_convention) active′= tag in keys(default_convention)
tag′= active′ ? tag : get(related_tags, tag, tag) tag′= active′ ? tag : get(related_tags, tag, tag)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment