summaryrefslogtreecommitdiff
path: root/rag/extractors.go
diff options
context:
space:
mode:
Diffstat (limited to 'rag/extractors.go')
-rw-r--r--rag/extractors.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/rag/extractors.go b/rag/extractors.go
index 4255fdb..0f9f3f4 100644
--- a/rag/extractors.go
+++ b/rag/extractors.go
@@ -95,9 +95,7 @@ func extractTextFromEpub(fpath string) (string, error) {
return "", fmt.Errorf("failed to open epub: %w", err)
}
defer r.Close()
-
var sb strings.Builder
-
for _, f := range r.File {
ext := strings.ToLower(path.Ext(f.Name))
if ext != ".xhtml" && ext != ".html" && ext != ".htm" && ext != ".xml" {
@@ -129,7 +127,6 @@ func extractTextFromEpub(fpath string) (string, error) {
sb.WriteString(stripHTML(string(buf)))
}
}
-
if sb.Len() == 0 {
return "", errors.New("no content extracted from epub")
}