From 26f82dd9eae7fc3239feaf8b3e23e7ab59cba069 Mon Sep 17 00:00:00 2001 From: nite Date: Sun, 24 Aug 2025 16:57:51 +1000 Subject: [PATCH] fix: trim whitespace from text before writing to chapter file --- text/wrapper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/text/wrapper.go b/text/wrapper.go index 70bbf32..feadb76 100644 --- a/text/wrapper.go +++ b/text/wrapper.go @@ -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) }