sync: refactor exercice synchronization
This commit is contained in:
parent
5b53fbda0b
commit
dc4a4925e3
5 changed files with 254 additions and 151 deletions
|
@ -72,8 +72,8 @@ func SyncExerciceHints(i Importer, exercice fic.Exercice) (errs []string) {
|
|||
} else if hint.Content == "" {
|
||||
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 = ProcessMarkdown(i, hint.Content, exercice.Path)
|
||||
} else if hint.Content, err = ProcessMarkdown(i, hint.Content, exercice.Path); err != nil{
|
||||
errs = append(errs, fmt.Sprintf("%q: challenge.txt: hint %s (%d): error during markdown formating: %s", path.Base(exercice.Path), hint.Title, n+1, err))
|
||||
}
|
||||
|
||||
// Import hint
|
||||
|
|
Reference in a new issue