sync: import texts as Markdown
This commit is contained in:
parent
be7a159815
commit
c33390fa80
4 changed files with 16 additions and 6 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
|
||||
"srs.epita.fr/fic-server/libfic"
|
||||
"github.com/julienschmidt/httprouter"
|
||||
"gopkg.in/russross/blackfriday.v2"
|
||||
)
|
||||
|
||||
// getThemes returns all theme directories in the base directory.
|
||||
|
@ -67,8 +68,12 @@ func SyncThemes(i Importer) []string {
|
|||
}
|
||||
}
|
||||
|
||||
// Format authors
|
||||
authors_str := strings.Join(authors, ", ")
|
||||
|
||||
// Format overview (markdown)
|
||||
intro = string(blackfriday.Run([]byte(intro)))
|
||||
|
||||
if theme.Name != tname || theme.Authors != authors_str || theme.Intro != intro {
|
||||
theme.Name = tname
|
||||
theme.Authors = authors_str
|
||||
|
|
Reference in a new issue