mirror of
https://github.com/bestnite/bilinovel-downloader.git
synced 2025-10-25 16:51:01 +00:00
fix: trim whitespace from text before writing to chapter file
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user