sync: automatically add   before ponctuation

This commit is contained in:
nemunaire 2018-12-09 23:59:20 +01:00
parent 0075bdeb52
commit 0d8505131e
3 changed files with 13 additions and 5 deletions

View file

@ -71,9 +71,9 @@ func SyncThemes(i Importer) []string {
// Extract theme's label
if f := strings.Index(tdir, "-"); f >= 0 {
tname = tdir[f+1:]
tname = fixnbsp(tdir[f+1:])
} else {
tname = tdir
tname = fixnbsp(tdir)
}
if authors, err = getAuthors(i, tdir); err != nil {
@ -83,7 +83,7 @@ func SyncThemes(i Importer) []string {
errs = append(errs, fmt.Sprintf("%q: unable to get theme's overview: %s", tname, err))
} else {
// Split headline from intro
ovrvw := strings.Split(intro, "\n")
ovrvw := strings.Split(fixnbsp(intro), "\n")
headline = ovrvw[0]
if len(ovrvw) > 1 {
intro = strings.Join(ovrvw[1:], "\n")