fix finding single note by label with mixed case

This commit is contained in:
zadam
2021-10-08 22:13:39 +02:00
parent a08690b123
commit 20696aa0ab
5 changed files with 17 additions and 5 deletions

View File

@@ -29,7 +29,13 @@ class Becca {
/** @return {Attribute[]} */
findAttributes(type, name) {
return this.attributeIndex[`${type}-${name.toLowerCase()}`] || [];
name = name.trim().toLowerCase();
if (name.startsWith('#') || name.startsWith('~')) {
name = name.substr(1);
}
return this.attributeIndex[`${type}-${name}`] || [];
}
/** @return {Attribute[]} */