1
0
mirror of https://github.com/bestnite/bilinovel-downloader.git synced 2025-12-11 01:10:14 +00:00

fix: trim whitespace from text before writing to chapter file

This commit is contained in:
2025-08-24 16:57:51 +10:00
parent e9fbe5c5db
commit 26f82dd9ea

View File

@@ -46,7 +46,7 @@ func PackVolumeToText(volume *model.Volume, outputPath string) error {
}
doc.Find("img").Remove()
text := doc.Text()
_, err = chapterFile.WriteString(text)
_, err = chapterFile.WriteString(strings.TrimSpace(text))
if err != nil {
return fmt.Errorf("failed to write chapter file: %v", err)
}