This commit is contained in:
JMARyA 2024-10-20 22:13:10 +02:00
parent 1cc0b61c35
commit 31d5fd2b83
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
2 changed files with 2 additions and 2 deletions

View file

@ -27,7 +27,7 @@ impl ItemDB {
/// Retrieves an item by name
pub fn get_item(&self, item: &str) -> Option<&Item> {
self.index.get(item)
self.index.get(&item.to_lowercase())
}
/// Get all items

View file

@ -56,7 +56,7 @@ impl Item {
pub fn new(doc: &mdq::Document) -> Self {
let path = std::path::Path::new(&doc.path);
let id = path.file_stem().unwrap().to_str().unwrap().to_string();
let id = path.file_stem().unwrap().to_str().unwrap().to_lowercase();
let image_path = get_image(path);