File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,11 +120,21 @@ function getNormalizeWithNFKC() {
120120 ( typeof PDFJSDev === "undefined" && FeatureTest . platform . isFirefox ) ||
121121 ( typeof PDFJSDev !== "undefined" && PDFJSDev . test ( "MOZCENTRAL" ) )
122122 ) {
123+ // The `NormalizeWithNFKC` string is generated with the for loop below.
124+ // Because of a small difference between Chrome and Firefox, the string is
125+ // only hardcoded for Firefox, and Chrome (or others) will generate it at
126+ // runtime.
127+ // In order to detect if the string is up to date, a check is performed in
128+ // the loop below, and if a difference is detected, an error is thrown.
123129 /* eslint-disable no-irregular-whitespace */
124130 NormalizeWithNFKC ||= `\xA0¨ª¯²-µ¸-º¼-¾IJ-ijĿ-ŀʼnſDŽ-njDZ-dzʰ-ʸ˘-˝ˠ-ˤʹͺ;΄-΅·ϐ-ϖϰ-ϲϴ-ϵϹևٵ-ٸक़-य़ড়-ঢ়য়ਲ਼ਸ਼ਖ਼-ਜ਼ਫ਼ଡ଼-ଢ଼ำຳໜ-ໝ༌གྷཌྷདྷབྷཛྷཀྵჼᴬ-ᴮᴰ-ᴺᴼ-ᵍᵏ-ᵪᵸᶛ-ᶿẚ-ẛάέήίόύώΆ᾽-῁ΈΉ῍-῏ΐΊ῝-῟ΰΎ῭-`ΌΏ´-῾ - ‑‗․-… ″-‴‶-‷‼‾⁇-⁉⁗ ⁰-ⁱ⁴-₎ₐ-ₜ₨℀-℃℅-ℇ℉-ℓℕ-№ℙ-ℝ℠-™ℤΩℨK-ℭℯ-ℱℳ-ℹ℻-⅀ⅅ-ⅉ⅐-ⅿ↉∬-∭∯-∰〈-〉①-⓪⨌⩴-⩶⫝̸ⱼ-ⱽⵯ⺟⻳⼀-⿕ 〶〸-〺゛-゜ゟヿㄱ-ㆎ㆒-㆟㈀-㈞㈠-㉇㉐-㉾㊀-㏿ꚜ-ꚝꝰ-ꟴꟸ-ꟹꭜ-ꭟꭩ豈-嗀塚晴凞-羽蘒諸逸-都飯-舘並-龎ff-stﬓ-ﬗיִײַ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-﷼︐-︙︰-﹄﹇-﹒﹔-﹦﹨-﹫ﹰ-ﹲﹴﹶ-ﻼ!-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ¢-₩` ;
125131 }
126132
127- if ( typeof PDFJSDev === "undefined" || PDFJSDev . test ( "TESTING" ) ) {
133+ if (
134+ typeof PDFJSDev === "undefined" ||
135+ PDFJSDev . test ( "TESTING" ) ||
136+ ( ! PDFJSDev . test ( "MOZCENTRAL" ) && ! NormalizeWithNFKC )
137+ ) {
128138 const ranges = [ ] ;
129139 const range = [ ] ;
130140 const diacriticsRegex = / ^ \p{ M} $ / u;
You can’t perform that action at this time.
0 commit comments