MOWE BUG FIXWES ;;;

pull/2/head
Isaac Mills 3 years ago
parent 7f91d6f333
commit 651b1451c1
No known key found for this signature in database
GPG Key ID: B67D7410F33A0F61

File diff suppressed because it is too large Load Diff

@ -150,17 +150,9 @@ impl<'a> UwUify<'a> {
} }
fn uwuify_sentence<T: Write>(&self, text: &str, out: &mut T) -> Result<(), std::io::Error> { fn uwuify_sentence<T: Write>(&self, text: &str, out: &mut T) -> Result<(), std::io::Error> {
text.as_bytes() text.lines().try_for_each(|line| {
.split(|w| matches!(*w, b'\t' | b'\x0C' | b'\r' | b' ')) line.split_whitespace()
.scan([].as_ref(), |scan, i| { .map(|f| f.as_bytes())
let ret = i != &[b' '];
*scan = i;
if ret {
Some(i)
} else {
None
}
})
.try_for_each(|word| { .try_for_each(|word| {
let mut seeder = UwUSeeder::new(word, self.random); let mut seeder = UwUSeeder::new(word, self.random);
let random_value = seeder.random(); let random_value = seeder.random();
@ -200,6 +192,8 @@ impl<'a> UwUify<'a> {
})?; })?;
} }
out.write_all(b" ") out.write_all(b" ")
})?;
out.write_all(b"\n")
}) })
} }
} }

Loading…
Cancel
Save