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

Support search with or without diacritics (bug 1508345, bug 916883, bug 1651113)

- get original index in using a dichotomic seach instead of a linear one;
  - normalize the text in using NFD;
  - convert the query string into a RegExp;
  - replace whitespaces in the query with \s+;
  - handle hyphens at eol use to break a word;
  - add some \s* around punctuation signs
This commit is contained in:
Calixte Denizet 2021-04-18 23:37:22 +02:00
parent 70073ed81c
commit 1f41028fcb
12 changed files with 604 additions and 172 deletions

View file

@ -170,6 +170,7 @@ find_next.title=Find the next occurrence of the phrase
find_next_label=Next
find_highlight=Highlight all
find_match_case_label=Match case
find_match_diacritics_label=Match Diacritics
find_entire_word_label=Whole words
find_reached_top=Reached top of document, continued from bottom
find_reached_bottom=Reached end of document, continued from top