Detect theme and exercice language at runtime (not stored)

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

View file

@ -17,7 +17,11 @@ import (
"github.com/yuin/goldmark/util"
)
func GrammalecteCheckMDText(str string, exceptions *sync.CheckExceptions, forbiddenStrings ...string) (errs []error) {
func GrammalecteCheckMDText(str string, lang string, exceptions *sync.CheckExceptions, forbiddenStrings ...string) (errs []error) {
if !isRecognizedLanguage(lang) {
return
}
if exceptions != nil {
for k := range *exceptions {
tmp := strings.SplitN(k, ":", 3)