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 an eol by a whitespace when the last char is a Katakana-Hiragana diacritic

This commit is contained in:
Calixte Denizet 2023-02-16 11:25:15 +01:00
parent 546902df63
commit fc7d74385f
4 changed files with 76 additions and 14 deletions

View file

@ -574,3 +574,4 @@
!bug1815476.pdf
!issue16021.pdf
!bug1770750.pdf
!issue16063.pdf

BIN
test/pdfs/issue16063.pdf Executable file

Binary file not shown.

View file

@ -818,4 +818,40 @@ describe("pdf_find_controller", function () {
},
});
});
it("performs a search in a text with some Hiragana diacritics at the end of a line", async function () {
const { eventBus, pdfFindController } = await initPdfFindController(
"issue16063.pdf"
);
await testSearch({
eventBus,
pdfFindController,
state: {
query: "行うことができる速結端子",
},
matchesPerPage: [1],
selectedMatch: {
pageIndex: 0,
matchIndex: 0,
},
pageMatches: [[63]],
pageMatchesLength: [[12]],
});
await testSearch({
eventBus,
pdfFindController,
state: {
query: "デュプレックス",
},
matchesPerPage: [1],
selectedMatch: {
pageIndex: 0,
matchIndex: 0,
},
pageMatches: [[205]],
pageMatchesLength: [[7]],
});
});
});