We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ae6cdc commit 881f977Copy full SHA for 881f977
1 file changed
web/pdf_find_utils.js
@@ -140,6 +140,9 @@ function getNormalizeWithNFKC() {
140
const diacriticsRegex = /^\p{M}$/u;
141
// Some chars must be replaced by their NFKC counterpart during a search.
142
for (let i = 0; i < 65536; i++) {
143
+ if (i >= 0xd800 && i <= 0xdfff) {
144
+ continue; // Skip surrogates since they're not valid Unicode scalar values.
145
+ }
146
const c = String.fromCharCode(i);
147
if (c.normalize("NFKC") !== c && !diacriticsRegex.test(c)) {
148
if (range.length !== 2) {
0 commit comments