Skip to content

Commit

Permalink
fix pptx reader #146
Browse files Browse the repository at this point in the history
  • Loading branch information
juzeon committed Dec 11, 2023
1 parent 0cd5993 commit 59c6782
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/file_readers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 59c6782

Please # to comment.