From 59c6782801faa361ae9816d91b8a2e8b98bc365c Mon Sep 17 00:00:00 2001 From: juzeon <812312770@qq.com> Date: Mon, 11 Dec 2023 16:56:37 +0800 Subject: [PATCH] fix pptx reader #146 --- util/file_readers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/file_readers.go b/util/file_readers.go index 83bf076..7b60439 100644 --- a/util/file_readers.go +++ b/util/file_readers.go @@ -140,7 +140,7 @@ func (p PptxDocumentReader) Read(filePath string) (string, error) { slideReg := regexp.MustCompile("slide(\\d+)\\.xml") policy := bluemonday.StripTagsPolicy() for _, file := range reader.File { - if !strings.HasPrefix(file.Name, "ppt/slides/") || strings.HasSuffix(file.Name, ".rels") { + if !strings.HasPrefix(file.Name, "ppt/slides/") || !strings.HasSuffix(file.Name, ".xml") { continue } arr := slideReg.FindStringSubmatch(file.Name)