Skip to content

Commit

Permalink
Upgrade to Unicode 9.0.0 (closes #171)
Browse files Browse the repository at this point in the history
  • Loading branch information
slevithan committed Apr 16, 2017
1 parent 60ae9ec commit 5b4ec78
Show file tree
Hide file tree
Showing 7 changed files with 275 additions and 135 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -116,7 +116,7 @@ XRegExp('^\\pS$').test('💩'); // -> true


Opting in to astral mode disables the use of `\p{…}` and `\P{…}` within character classes. In astral mode, use e.g. `(\pL|[0-9_])+` instead of `[\pL0-9_]+`. Opting in to astral mode disables the use of `\p{…}` and `\P{…}` within character classes. In astral mode, use e.g. `(\pL|[0-9_])+` instead of `[\pL0-9_]+`.


XRegExp uses Unicode 8.0.0. XRegExp uses Unicode 9.0.0.


### XRegExp.build ### XRegExp.build


Expand Down
52 changes: 48 additions & 4 deletions src/addons/unicode-blocks.js
Expand Up @@ -13,7 +13,7 @@ module.exports = function(XRegExp) {
* `\p{InBasicLatin}`. Token names are case insensitive, and any spaces, hyphens, and * `\p{InBasicLatin}`. Token names are case insensitive, and any spaces, hyphens, and
* underscores are ignored. * underscores are ignored.
* *
* Uses Unicode 8.0.0. * Uses Unicode 9.0.0.
* *
* @requires XRegExp, Unicode Base * @requires XRegExp, Unicode Base
*/ */
Expand All @@ -23,6 +23,10 @@ module.exports = function(XRegExp) {
} }


XRegExp.addUnicodeData([ XRegExp.addUnicodeData([
{
name: 'InAdlam',
astral: '\uD83A[\uDD00-\uDD5F]'
},
{ {
name: 'InAegean_Numbers', name: 'InAegean_Numbers',
astral: '\uD800[\uDD00-\uDD3F]' astral: '\uD800[\uDD00-\uDD3F]'
Expand Down Expand Up @@ -119,6 +123,10 @@ module.exports = function(XRegExp) {
name: 'InBengali', name: 'InBengali',
bmp: '\u0980-\u09FF' bmp: '\u0980-\u09FF'
}, },
{
name: 'InBhaiksuki',
astral: '\uD807[\uDC00-\uDC6F]'
},
{ {
name: 'InBlock_Elements', name: 'InBlock_Elements',
bmp: '\u2580-\u259F' bmp: '\u2580-\u259F'
Expand Down Expand Up @@ -197,15 +205,15 @@ module.exports = function(XRegExp) {
}, },
{ {
name: 'InCJK_Unified_Ideographs_Extension_C', name: 'InCJK_Unified_Ideographs_Extension_C',
astral: '\uD86D[\uDC00-\uDF3F]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD869[\uDF00-\uDFFF]' astral: '\uD869[\uDF00-\uDFFF]|[\uD86A-\uD86C][\uDC00-\uDFFF]|\uD86D[\uDC00-\uDF3F]'
}, },
{ {
name: 'InCJK_Unified_Ideographs_Extension_D', name: 'InCJK_Unified_Ideographs_Extension_D',
astral: '\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1F]' astral: '\uD86D[\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1F]'
}, },
{ {
name: 'InCJK_Unified_Ideographs_Extension_E', name: 'InCJK_Unified_Ideographs_Extension_E',
astral: '[\uD86F-\uD872][\uDC00-\uDFFF]|\uD873[\uDC00-\uDEAF]|\uD86E[\uDC20-\uDFFF]' astral: '\uD86E[\uDC20-\uDFFF]|[\uD86F-\uD872][\uDC00-\uDFFF]|\uD873[\uDC00-\uDEAF]'
}, },
{ {
name: 'InCarian', name: 'InCarian',
Expand Down Expand Up @@ -299,6 +307,10 @@ module.exports = function(XRegExp) {
name: 'InCyrillic_Extended_B', name: 'InCyrillic_Extended_B',
bmp: '\uA640-\uA69F' bmp: '\uA640-\uA69F'
}, },
{
name: 'InCyrillic_Extended_C',
bmp: '\u1C80-\u1C8F'
},
{ {
name: 'InCyrillic_Supplement', name: 'InCyrillic_Supplement',
bmp: '\u0500-\u052F' bmp: '\u0500-\u052F'
Expand Down Expand Up @@ -399,6 +411,10 @@ module.exports = function(XRegExp) {
name: 'InGlagolitic', name: 'InGlagolitic',
bmp: '\u2C00-\u2C5F' bmp: '\u2C00-\u2C5F'
}, },
{
name: 'InGlagolitic_Supplement',
astral: '\uD838[\uDC00-\uDC2F]'
},
{ {
name: 'InGothic', name: 'InGothic',
astral: '\uD800[\uDF30-\uDF4F]' astral: '\uD800[\uDF30-\uDF4F]'
Expand Down Expand Up @@ -479,6 +495,10 @@ module.exports = function(XRegExp) {
name: 'InIdeographic_Description_Characters', name: 'InIdeographic_Description_Characters',
bmp: '\u2FF0-\u2FFF' bmp: '\u2FF0-\u2FFF'
}, },
{
name: 'InIdeographic_Symbols_and_Punctuation',
astral: '\uD81B[\uDFE0-\uDFFF]'
},
{ {
name: 'InImperial_Aramaic', name: 'InImperial_Aramaic',
astral: '\uD802[\uDC40-\uDC5F]' astral: '\uD802[\uDC40-\uDC5F]'
Expand Down Expand Up @@ -639,6 +659,10 @@ module.exports = function(XRegExp) {
name: 'InManichaean', name: 'InManichaean',
astral: '\uD802[\uDEC0-\uDEFF]' astral: '\uD802[\uDEC0-\uDEFF]'
}, },
{
name: 'InMarchen',
astral: '\uD807[\uDC70-\uDCBF]'
},
{ {
name: 'InMathematical_Alphanumeric_Symbols', name: 'InMathematical_Alphanumeric_Symbols',
astral: '\uD835[\uDC00-\uDFFF]' astral: '\uD835[\uDC00-\uDFFF]'
Expand Down Expand Up @@ -689,7 +713,7 @@ module.exports = function(XRegExp) {
}, },
{ {
name: 'InMiscellaneous_Symbols_and_Pictographs', name: 'InMiscellaneous_Symbols_and_Pictographs',
astral: '\uD83D[\uDC00-\uDDFF]|\uD83C[\uDF00-\uDFFF]' astral: '\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDDFF]'
}, },
{ {
name: 'InMiscellaneous_Technical', name: 'InMiscellaneous_Technical',
Expand All @@ -707,6 +731,10 @@ module.exports = function(XRegExp) {
name: 'InMongolian', name: 'InMongolian',
bmp: '\u1800-\u18AF' bmp: '\u1800-\u18AF'
}, },
{
name: 'InMongolian_Supplement',
astral: '\uD805[\uDE60-\uDE7F]'
},
{ {
name: 'InMro', name: 'InMro',
astral: '\uD81A[\uDE40-\uDE6F]' astral: '\uD81A[\uDE40-\uDE6F]'
Expand Down Expand Up @@ -743,6 +771,10 @@ module.exports = function(XRegExp) {
name: 'InNew_Tai_Lue', name: 'InNew_Tai_Lue',
bmp: '\u1980-\u19DF' bmp: '\u1980-\u19DF'
}, },
{
name: 'InNewa',
astral: '\uD805[\uDC00-\uDC7F]'
},
{ {
name: 'InNumber_Forms', name: 'InNumber_Forms',
bmp: '\u2150-\u218F' bmp: '\u2150-\u218F'
Expand Down Expand Up @@ -795,6 +827,10 @@ module.exports = function(XRegExp) {
name: 'InOrnamental_Dingbats', name: 'InOrnamental_Dingbats',
astral: '\uD83D[\uDE50-\uDE7F]' astral: '\uD83D[\uDE50-\uDE7F]'
}, },
{
name: 'InOsage',
astral: '\uD801[\uDCB0-\uDCFF]'
},
{ {
name: 'InOsmanya', name: 'InOsmanya',
astral: '\uD801[\uDC80-\uDCAF]' astral: '\uD801[\uDC80-\uDCAF]'
Expand Down Expand Up @@ -995,6 +1031,14 @@ module.exports = function(XRegExp) {
name: 'InTamil', name: 'InTamil',
bmp: '\u0B80-\u0BFF' bmp: '\u0B80-\u0BFF'
}, },
{
name: 'InTangut',
astral: '[\uD81C-\uD821][\uDC00-\uDFFF]'
},
{
name: 'InTangut_Components',
astral: '\uD822[\uDC00-\uDEFF]'
},
{ {
name: 'InTelugu', name: 'InTelugu',
bmp: '\u0C00-\u0C7F' bmp: '\u0C00-\u0C7F'
Expand Down

0 comments on commit 5b4ec78

Please sign in to comment.