Fix escaped backslashes in output ascii art by unescaping them

This commit is contained in:
Luna 2024-07-17 14:23:50 -07:00
parent de43bf74a9
commit cd1858134c

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