Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docxtxt/docxreader.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ func hasP(data string) bool {
// listP for w:p tag value
func (d *docx) listP(data string) {
var result []string
re := regexp.MustCompile(`(?U)<w:p[^>]*(.*)</w:p>`)
// Support the latest DOCX (OOXML) format.
re := regexp.MustCompile(`(?s)<w:p\b[^>]*>(.*?)</w:p>`)
for _, match := range re.FindAllStringSubmatch(data, -1) {
result = append(result, match[1])
}
Expand Down