Detect theme and exercice language at runtime (not stored)

This commit is contained in:
nemunaire 2023-01-17 18:26:04 +01:00
parent 99cc79421f
commit aa0e7406c1
17 changed files with 99 additions and 42 deletions

View file

@ -85,7 +85,7 @@ func buildExerciceHints(i Importer, exercice *fic.Exercice, exceptions *CheckExc
} else {
// Call checks hooks
for _, hk := range hooks.mdTextHooks {
for _, err := range hk(h.Content, exceptions) {
for _, err := range hk(h.Content, exercice.Language, exceptions) {
errs = append(errs, NewHintError(exercice, h, n, err))
}
}
@ -97,7 +97,7 @@ func buildExerciceHints(i Importer, exercice *fic.Exercice, exceptions *CheckExc
// Call checks hooks
for _, hook := range hooks.hintHooks {
for _, e := range hook(h, exceptions) {
for _, e := range hook(h, exercice, exceptions) {
errs = append(errs, NewHintError(exercice, h, n, e))
}
}