Skip to content

Commit

Permalink
do not touch case-insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
tugrul committed Jan 18, 2023
1 parent d9a6a1f commit 967ac02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions punycode.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const initialN = 128; // 0x80
const delimiter = '-'; // '\x2D'

/** Regular expressions */
const regexPunycode = /^xn--/;
const regexPunycode = /^xn--/i;
const regexNonASCII = /[^\0-\x7F]/; // Note: U+007F DEL is excluded too.
const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators

Expand Down Expand Up @@ -389,7 +389,7 @@ const encode = function(input) {
const toUnicode = function(input) {
return mapDomain(input, function(string) {
return regexPunycode.test(string)
? decode(string.slice(4).toLowerCase())
? decode(string.slice(4))
: string;
});
};
Expand Down

0 comments on commit 967ac02

Please sign in to comment.