Merge pull request #28 from luna-1024/riir-fix-escaped-backslashes

Fix escaped backslashes in output ascii art by unescaping them
This commit is contained in:
Teoh Han Hui 2024-07-19 01:23:31 +08:00 committed by GitHub
commit 2613471978
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -226,9 +226,13 @@ where
.next()
.and_then(|pattern| pattern.trim().strip_suffix(')'))?;
// Unescape backslashes here because backslashes are escaped in neofetch
// for printf
let art = art.replace(r"\\", r"\");
Some(AsciiDistro {
pattern: pattern.to_owned(),
art: art.to_owned(),
art,
})
}
blocks