Skip to content

Commit

Permalink
fix: extract text concatenation (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
pserrer1 authored Jun 24, 2024
1 parent 477b228 commit 4664ee2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async function getPageText(document: PDFDocumentProxy, pageNumber: number) {
(content.items as TextItem[])
// eslint-disable-next-line unicorn/no-null
.filter((item) => item.str != null)
.map((item) => item.str)
.join(" ")
.map((item) => item.str + (item.hasEOL ? "\n" : ""))
.join("")
);
}

0 comments on commit 4664ee2

Please sign in to comment.