mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Merge pull request #16275 from calixteman/ifx_search_with_fractions
Fix search of numbers inside fractions
This commit is contained in:
commit
7571842d84
2 changed files with 71 additions and 2 deletions
|
@ -381,6 +381,66 @@ describe("pdf_find_controller", function () {
|
|||
pageMatches: [[27, 54]],
|
||||
pageMatchesLength: [[1, 1]],
|
||||
});
|
||||
|
||||
await testSearch({
|
||||
eventBus,
|
||||
pdfFindController,
|
||||
state: {
|
||||
query: "1",
|
||||
},
|
||||
matchesPerPage: [3],
|
||||
selectedMatch: {
|
||||
pageIndex: 0,
|
||||
matchIndex: 0,
|
||||
},
|
||||
pageMatches: [[27, 54, 55]],
|
||||
pageMatchesLength: [[1, 1, 1]],
|
||||
});
|
||||
|
||||
await testSearch({
|
||||
eventBus,
|
||||
pdfFindController,
|
||||
state: {
|
||||
query: "2",
|
||||
},
|
||||
matchesPerPage: [2],
|
||||
selectedMatch: {
|
||||
pageIndex: 0,
|
||||
matchIndex: 0,
|
||||
},
|
||||
pageMatches: [[27, 54]],
|
||||
pageMatchesLength: [[1, 1]],
|
||||
});
|
||||
|
||||
await testSearch({
|
||||
eventBus,
|
||||
pdfFindController,
|
||||
state: {
|
||||
query: "1/",
|
||||
},
|
||||
matchesPerPage: [3],
|
||||
selectedMatch: {
|
||||
pageIndex: 0,
|
||||
matchIndex: 0,
|
||||
},
|
||||
pageMatches: [[27, 54, 55]],
|
||||
pageMatchesLength: [[1, 1, 1]],
|
||||
});
|
||||
|
||||
await testSearch({
|
||||
eventBus,
|
||||
pdfFindController,
|
||||
state: {
|
||||
query: "1/21",
|
||||
},
|
||||
matchesPerPage: [1],
|
||||
selectedMatch: {
|
||||
pageIndex: 0,
|
||||
matchIndex: 0,
|
||||
},
|
||||
pageMatches: [[54]],
|
||||
pageMatchesLength: [[2]],
|
||||
});
|
||||
});
|
||||
|
||||
it("performs a normal search, where the text with diacritics is normalized", async function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue