diff options
author | metamuffin <metamuffin@disroot.org> | 2024-09-17 16:08:52 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-09-17 16:57:34 +0200 |
commit | 77a73b415888b0285ba64b27c3f69440216e475c (patch) | |
tree | e08fd00b839089035b46b49e15fa5d50b471518a /pixel-client/src | |
parent | bf1a5cef4b7fa87cdd382c565044731c1ccef9e3 (diff) | |
download | hurrycurry-77a73b415888b0285ba64b27c3f69440216e475c.tar hurrycurry-77a73b415888b0285ba64b27c3f69440216e475c.tar.bz2 hurrycurry-77a73b415888b0285ba64b27c3f69440216e475c.tar.zst |
trim spaces around = in locales
Diffstat (limited to 'pixel-client/src')
-rw-r--r-- | pixel-client/src/strings.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pixel-client/src/strings.rs b/pixel-client/src/strings.rs index cf225c7d..a941ecec 100644 --- a/pixel-client/src/strings.rs +++ b/pixel-client/src/strings.rs @@ -23,7 +23,10 @@ impl Strings { .skip(1) .map(|l| { let (k, v) = l.split_once("=").ok_or(anyhow!("'=' missing"))?; - Ok::<_, anyhow::Error>((k.to_owned(), v.replace("%n", "\n"))) + Ok::<_, anyhow::Error>(( + k.trim_end().to_owned(), + v.trim_start().replace("%n", "\n"), + )) }) .try_collect()?, )) |