Skip to content

Commit

Permalink
Disabled alinea log, report "sceau(x) magique"
Browse files Browse the repository at this point in the history
  • Loading branch information
loicfrance authored Aug 1, 2022
1 parent ab9a3a5 commit a415ee9
Showing 1 changed file with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ public class TextProcess {
"(Tōsaka)|"+ // -> Tohsaka
"([ÉéEe]v[ée]nement)|"+ // -> évènement
"([Pp]éron\\b)|"+ // -> perron
"([Dd]inner\\b)"+ // -> Dîner
"([Dd]inner\\b)|"+ // -> Dîner
"([Ss]ceaux?\\s[Mm]agique)"+ // -> Blason Magique
")"
}, {"inconsistance avec les règles établies",
"(\\bQ-Qu)|"+ // -> Qu-Qu
Expand Down Expand Up @@ -158,21 +159,21 @@ private static String fixAlinea(String line, int neededAlinea, BiFunction<String
if (alinea != neededAlinea) {
switch(alinea) {
case 0 :
report.apply(String.format("alinea de %d caractères attendu", neededAlinea), -1);
//report.apply(String.format("alinea de %d caractères attendu", neededAlinea), -1);
break;
case 2 : case 3 :
report.apply(String.format("alinea de %d caractères au lieu de %d (corrigé auto.)",
alinea, neededAlinea), -1);
//report.apply(String.format("alinea de %d caractères au lieu de %d (corrigé auto.)",
// alinea, neededAlinea), -1);
line = " ".repeat(neededAlinea) + line.substring(alinea);
case 1 : case 4 :
if (neededAlinea == 0) {
if( alinea > 1)
report.apply(String.format("alinea de %d caractères inattendu", alinea), -1);
}
else {
report.apply(String.format("alinea de %d caractère au lieu de %d",
alinea, neededAlinea), -1);
}
//if (neededAlinea == 0) {
// if( alinea > 1)
// report.apply(String.format("alinea de %d caractères inattendu", alinea), -1);
//}
//else {
// report.apply(String.format("alinea de %d caractère au lieu de %d",
// alinea, neededAlinea), -1);
//}
default : break; // ignore alineas > 4 caractères
}
}
Expand Down

0 comments on commit a415ee9

Please sign in to comment.