mirror of
https://github.com/bestnite/bilinovel-downloader.git
synced 2026-04-26 20:41:53 +00:00
fix: trim whitespace from text before writing to chapter file
This commit is contained in:
+1
-1
@@ -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