tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

Extender.js (2876B)


      1 // Copyright 2025 Mathias Bynens. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 author: Mathias Bynens
      6 description: >
      7  Unicode property escapes for `Extender`
      8 info: |
      9  Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests
     10  Unicode v17.0.0
     11 esid: sec-static-semantics-unicodematchproperty-p
     12 features: [regexp-unicode-property-escapes]
     13 includes: [regExpUtils.js]
     14 ---*/
     15 
     16 const matchSymbols = buildString({
     17  loneCodePoints: [
     18    0x0000B7,
     19    0x000640,
     20    0x0007FA,
     21    0x000A71,
     22    0x000AFB,
     23    0x000B55,
     24    0x000E46,
     25    0x000EC6,
     26    0x00180A,
     27    0x001843,
     28    0x001AA7,
     29    0x001C36,
     30    0x001C7B,
     31    0x003005,
     32    0x00A015,
     33    0x00A60C,
     34    0x00A9CF,
     35    0x00A9E6,
     36    0x00AA70,
     37    0x00AADD,
     38    0x00FF70,
     39    0x010D4E,
     40    0x010D6A,
     41    0x010D6F,
     42    0x011237,
     43    0x01135D,
     44    0x011A98,
     45    0x011DD9,
     46    0x016FE3,
     47    0x01E5EF
     48  ],
     49  ranges: [
     50    [0x0002D0, 0x0002D1],
     51    [0x003031, 0x003035],
     52    [0x00309D, 0x00309E],
     53    [0x0030FC, 0x0030FE],
     54    [0x00AAF3, 0x00AAF4],
     55    [0x010781, 0x010782],
     56    [0x0113D2, 0x0113D3],
     57    [0x0115C6, 0x0115C8],
     58    [0x016B42, 0x016B43],
     59    [0x016FE0, 0x016FE1],
     60    [0x016FF2, 0x016FF3],
     61    [0x01E13C, 0x01E13D],
     62    [0x01E944, 0x01E946]
     63  ]
     64 });
     65 testPropertyEscapes(
     66  /^\p{Extender}+$/u,
     67  matchSymbols,
     68  "\\p{Extender}"
     69 );
     70 testPropertyEscapes(
     71  /^\p{Ext}+$/u,
     72  matchSymbols,
     73  "\\p{Ext}"
     74 );
     75 
     76 const nonMatchSymbols = buildString({
     77  loneCodePoints: [
     78    0x016FE2
     79  ],
     80  ranges: [
     81    [0x00DC00, 0x00DFFF],
     82    [0x000000, 0x0000B6],
     83    [0x0000B8, 0x0002CF],
     84    [0x0002D2, 0x00063F],
     85    [0x000641, 0x0007F9],
     86    [0x0007FB, 0x000A70],
     87    [0x000A72, 0x000AFA],
     88    [0x000AFC, 0x000B54],
     89    [0x000B56, 0x000E45],
     90    [0x000E47, 0x000EC5],
     91    [0x000EC7, 0x001809],
     92    [0x00180B, 0x001842],
     93    [0x001844, 0x001AA6],
     94    [0x001AA8, 0x001C35],
     95    [0x001C37, 0x001C7A],
     96    [0x001C7C, 0x003004],
     97    [0x003006, 0x003030],
     98    [0x003036, 0x00309C],
     99    [0x00309F, 0x0030FB],
    100    [0x0030FF, 0x00A014],
    101    [0x00A016, 0x00A60B],
    102    [0x00A60D, 0x00A9CE],
    103    [0x00A9D0, 0x00A9E5],
    104    [0x00A9E7, 0x00AA6F],
    105    [0x00AA71, 0x00AADC],
    106    [0x00AADE, 0x00AAF2],
    107    [0x00AAF5, 0x00DBFF],
    108    [0x00E000, 0x00FF6F],
    109    [0x00FF71, 0x010780],
    110    [0x010783, 0x010D4D],
    111    [0x010D4F, 0x010D69],
    112    [0x010D6B, 0x010D6E],
    113    [0x010D70, 0x011236],
    114    [0x011238, 0x01135C],
    115    [0x01135E, 0x0113D1],
    116    [0x0113D4, 0x0115C5],
    117    [0x0115C9, 0x011A97],
    118    [0x011A99, 0x011DD8],
    119    [0x011DDA, 0x016B41],
    120    [0x016B44, 0x016FDF],
    121    [0x016FE4, 0x016FF1],
    122    [0x016FF4, 0x01E13B],
    123    [0x01E13E, 0x01E5EE],
    124    [0x01E5F0, 0x01E943],
    125    [0x01E947, 0x10FFFF]
    126  ]
    127 });
    128 testPropertyEscapes(
    129  /^\P{Extender}+$/u,
    130  nonMatchSymbols,
    131  "\\P{Extender}"
    132 );
    133 testPropertyEscapes(
    134  /^\P{Ext}+$/u,
    135  nonMatchSymbols,
    136  "\\P{Ext}"
    137 );
    138 
    139 reportCompare(0, 0);