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

Don't add an extra space after a Katakana or a Hiragana at the eol when searching

This commit is contained in:
Calixte Denizet 2022-11-29 10:46:48 +01:00
parent 44bc315444
commit ea1995991b
4 changed files with 27 additions and 1 deletions

View file

@ -557,3 +557,4 @@
!freetext_no_appearance.pdf
!issue15690.pdf
!bug1802888.pdf
!issue15759.pdf

BIN
test/pdfs/issue15759.pdf Executable file

Binary file not shown.

View file

@ -668,4 +668,25 @@ describe("pdf_find_controller", function () {
pageMatchesLength: [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],
});
});
it("performs a search in a text with some Katakana at the end of a line", async function () {
const { eventBus, pdfFindController } = await initPdfFindController(
"issue15759.pdf"
);
await testSearch({
eventBus,
pdfFindController,
state: {
query: "ソレノイド",
},
matchesPerPage: [1],
selectedMatch: {
pageIndex: 0,
matchIndex: 0,
},
pageMatches: [[6]],
pageMatchesLength: [[5]],
});
});
});