sync: import files in markdown, relative to theme/exercice dir

This commit is contained in:
nemunaire 2018-12-02 16:24:33 +01:00
parent 8c95782eff
commit 87471acf98
6 changed files with 75 additions and 8 deletions

View file

@ -12,7 +12,6 @@ import (
"srs.epita.fr/fic-server/libfic"
"gopkg.in/russross/blackfriday.v2"
_ "golang.org/x/crypto/blake2b"
)
@ -74,7 +73,7 @@ func SyncExerciceHints(i Importer, exercice fic.Exercice) (errs []string) {
errs = append(errs, fmt.Sprintf("%q: challenge.txt: hint %s (%d): content and filename can't be empty at the same time", path.Base(exercice.Path), hint.Title, n+1))
continue
} else {
hint.Content = string(blackfriday.Run([]byte(hint.Content)))
hint.Content = ProcessMarkdown(i, hint.Content, exercice.Path)
}
// Import hint