Fixed "l'hy*", max qty to 100
This commit is contained in:
parent
71a08a3906
commit
0bf574bd6e
|
@ -40,7 +40,7 @@ fn main() {
|
|||
}
|
||||
|
||||
let args: Arguments = argh::from_env();
|
||||
let qty = args.qty.unwrap_or(10).min(50).max(1);
|
||||
let qty = args.qty.unwrap_or(10).min(100).max(1);
|
||||
let sep = args.sep.unwrap_or(" ".to_string());
|
||||
let gender = match args.gender.as_ref().map(String::as_ref) {
|
||||
Some("m") => GENDER_M,
|
||||
|
@ -94,7 +94,11 @@ fn main() {
|
|||
if let Some(next) = parts.get(i + 1) {
|
||||
if next.starts_with(|c| {
|
||||
vec!['a', 'e', 'i', 'o', 'u', 'é', 'è', 'ê', 'h'].contains(&c)
|
||||
} && !next.starts_with("hy")) {
|
||||
} && !next.starts_with("hya")
|
||||
&& !next.starts_with("hye")
|
||||
&& !next.starts_with("hyé")
|
||||
&& !next.starts_with("hyè")
|
||||
&& !next.starts_with("hyo")) {
|
||||
to_replace.push((i, "l'"));
|
||||
} else {
|
||||
to_replace.push((i, (if gender == "masculins" { "le" } else { "la" })))
|
||||
|
|
Loading…
Reference in New Issue
Block a user