Skip to content

Commit

Permalink
punycode: update to v1.2.0
Browse files Browse the repository at this point in the history
This update adds support for RFC 3490 separators for improved
compatibility with web browsers.
  • Loading branch information
mathiasbynens authored and bnoordhuis committed Jan 16, 2013
1 parent 9668df8 commit bc764f3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/punycode.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! http://mths.be/punycode by @mathias */
/*! http://mths.be/punycode v1.2.0 by @mathias */
;(function(root) {

/**
Expand Down Expand Up @@ -29,12 +29,13 @@
delimiter = '-', // '\x2D'

/** Regular expressions */
regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars
regexPunycode = /^xn--/,
regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars
regexSeparators = /\x2E|\u3002|\uFF0E|\uFF61/g, // RFC 3490 separators

/** Error messages */
errors = {
'overflow': 'Overflow: input needs wider integers to process.',
'overflow': 'Overflow: input needs wider integers to process',
'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
'invalid-input': 'Invalid input'
},
Expand Down Expand Up @@ -85,8 +86,7 @@
* function.
*/
function mapDomain(string, fn) {
var glue = '.';
return map(string.split(glue), fn).join(glue);
return map(string.split(regexSeparators), fn).join('.');
}

/**
Expand Down Expand Up @@ -198,7 +198,7 @@
}

/**
* Converts a basic code point to lowercase is `flag` is falsy, or to
* Converts a basic code point to lowercase if `flag` is falsy, or to
* uppercase if `flag` is truthy. The code point is unchanged if it's
* caseless. The behavior is undefined if `codePoint` is not a basic code
* point.
Expand Down Expand Up @@ -470,7 +470,7 @@
* @memberOf punycode
* @type String
*/
'version': '1.1.1',
'version': '1.2.0',
/**
* An object of methods to convert from JavaScript's internal character
* representation (UCS-2) to decimal Unicode code points, and back.
Expand Down

0 comments on commit bc764f3

Please sign in to comment.