Currently, the locateSubstanceSheet function indexes substances using their Proper Name. but uses the parsedname when searching it, so it isn't really ever used for drugs that contain a space in their name (such as Psilocybin mushrooms).
This changes it to index by the parsedname as well as use .includes(drug_lowercased) rather than match whole, because users might not type out the full name.
Please let me know if you'd like this accomplished differently, I'm not sure if you'd rather use sanitize-substance-name (and add aliases for mushrooms / shrooms) to accomplish this.
Currently, the
locateSubstanceSheet
function indexes substances using theirProper Name
. but uses theparsedname
when searching it, so it isn't really ever used for drugs that contain a space in their name (such as Psilocybin mushrooms).This changes it to index by the
parsedname
as well as use.includes(drug_lowercased)
rather than match whole, because users might not type out the full name.Please let me know if you'd like this accomplished differently, I'm not sure if you'd rather use
sanitize-substance-name
(and add aliases for mushrooms / shrooms) to accomplish this.