mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Ignore position of combining diacritics when getting text (bug 1640217)
This commit is contained in:
parent
ff3b9ccf6e
commit
4e9f26afa3
2 changed files with 39 additions and 1 deletions
|
@ -780,4 +780,42 @@ describe("pdf_find_controller", function () {
|
|||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("performs a search in a text containing combining diacritics", async function () {
|
||||
if (isNodeJS) {
|
||||
pending("Linked test-cases are not supported in Node.js.");
|
||||
}
|
||||
|
||||
const { eventBus, pdfFindController } = await initPdfFindController(
|
||||
"issue12909.pdf"
|
||||
);
|
||||
|
||||
await testSearch({
|
||||
eventBus,
|
||||
pdfFindController,
|
||||
state: {
|
||||
query: "הספר",
|
||||
matchDiacritics: true,
|
||||
},
|
||||
matchesPerPage: [0, 0, 0, 0, 0, 0, 0, 0, 1],
|
||||
selectedMatch: {
|
||||
pageIndex: 8,
|
||||
matchIndex: 0,
|
||||
},
|
||||
});
|
||||
|
||||
await testSearch({
|
||||
eventBus,
|
||||
pdfFindController,
|
||||
state: {
|
||||
query: "הספר",
|
||||
matchDiacritics: false,
|
||||
},
|
||||
matchesPerPage: [0, 1, 0, 0, 0, 0, 0, 0, 1],
|
||||
selectedMatch: {
|
||||
pageIndex: 8,
|
||||
matchIndex: 0,
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue