destutterer doesnt drop stutter for prev
parent
d94cbd6927
commit
d32f7a4c40
|
|
@ -111,7 +111,7 @@ impl Destutterer {
|
||||||
next
|
next
|
||||||
};
|
};
|
||||||
let trailing_punctuation = next[without_trailing_punctuation.len() ..].to_string();
|
let trailing_punctuation = next[without_trailing_punctuation.len() ..].to_string();
|
||||||
let next = without_trailing_punctuation;
|
let next = without_trailing_punctuation.clone();
|
||||||
let next = {
|
let next = {
|
||||||
let mut n = prev.len().clamp(0, next.len());
|
let mut n = prev.len().clamp(0, next.len());
|
||||||
while n > 0 {
|
while n > 0 {
|
||||||
|
|
@ -125,7 +125,7 @@ impl Destutterer {
|
||||||
if next.len() == 0 {
|
if next.len() == 0 {
|
||||||
return "".to_string();
|
return "".to_string();
|
||||||
}
|
}
|
||||||
self.prev = Some(next.clone());
|
self.prev = Some(without_trailing_punctuation);
|
||||||
next + &trailing_punctuation
|
next + &trailing_punctuation
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue