Skip to content

Commit

Permalink
Fix manganelo chapters breaking export under windows (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
elboletaire authored Jan 20, 2023
1 parent 7578297 commit b344470
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions grabber/chapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ func (c Chapter) GetNumber() float64 {
return c.Number
}

// GetTitle returns the chapter title
// GetTitle returns the chapter title removing whitespace and newlines
func (c Chapter) GetTitle() string {
return strings.TrimSpace(c.Title)
title := strings.TrimSpace(c.Title)
title = strings.ReplaceAll(title, "\n", " ")
return title
}

0 comments on commit b344470

Please sign in to comment.