1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Don't replace cr by a white space when the last char on the line is an ideographic char

This commit is contained in:
Calixte Denizet 2022-09-04 12:47:45 +02:00
parent 50d72fc111
commit 6c6f6fb2b8
4 changed files with 35 additions and 4 deletions

View file

@ -538,3 +538,4 @@
!bug1782186.pdf
!tracemonkey_a11y.pdf
!bug1782564.pdf
!issue15340.pdf

BIN
test/pdfs/issue15340.pdf Normal file

Binary file not shown.

View file

@ -626,4 +626,25 @@ describe("pdf_find_controller", function () {
pageMatchesLength: [[8]],
});
});
it("performs a search in a text containing an ideographic at the end of a line", async function () {
const { eventBus, pdfFindController } = await initPdfFindController(
"issue15340.pdf"
);
await testSearch({
eventBus,
pdfFindController,
state: {
query: "検知機構",
},
matchesPerPage: [1],
selectedMatch: {
pageIndex: 0,
matchIndex: 0,
},
pageMatches: [[29]],
pageMatchesLength: [[4]],
});
});
});