repochecker/grammalecte: Fix out of bound array

This commit is contained in:
nemunaire 2022-10-31 23:38:18 +01:00
parent 98939e9d61
commit 50b3e4c739

View file

@ -57,7 +57,7 @@ func GrammalecteCheckMDText(str string, exceptions *sync.CheckExceptions) (errs
for k := range *exceptions { for k := range *exceptions {
tmp := strings.SplitN(k, ":", 3) tmp := strings.SplitN(k, ":", 3)
if len(tmp) == 3 && tmp[1] == "quote" { if len(tmp) == 3 && tmp[1] == "quote" {
str = strings.Replace(str, tmp[3], "une citation a été remplacée ici", -1) str = strings.Replace(str, tmp[2], "une citation a été remplacée ici", -1)
} }
} }
} }