repochecker/grammalecte: Check resolution.md

This commit is contained in:
nemunaire 2022-11-24 13:10:19 +01:00
parent 1f3f0fd55b
commit 80422daffb
4 changed files with 232 additions and 19 deletions

View file

@ -4,7 +4,6 @@ import (
"bytes"
"fmt"
"log"
"strings"
"unicode"
"srs.epita.fr/fic-server/admin/sync"
@ -52,21 +51,6 @@ func GrammalecteCheckHint(hint *fic.EHint, exceptions *sync.CheckExceptions) (er
return
}
func GrammalecteCheckMDText(str string, exceptions *sync.CheckExceptions) (errs []error) {
if exceptions != nil {
for k := range *exceptions {
tmp := strings.SplitN(k, ":", 3)
if len(tmp) == 3 && tmp[1] == "quote" {
str = strings.Replace(str, tmp[2], "une citation a été remplacée ici", -1)
}
}
}
errs = append(errs, grammalecte("", str, 0, exceptions, &CommonOpts)...)
return
}
func GrammalecteCheckGrammar(data interface{}, exceptions *sync.CheckExceptions) []error {
if s, ok := data.(string); ok {
return grammalecte("", s, 0, exceptions, &CommonOpts)