regenerate
Advanced tools
Comparing version 1.2.0 to 1.2.1
{ | ||
"name": "regenerate", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Generate JavaScript-compatible regular expressions based on a given set of Unicode symbols or code points.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://mths.be/regenerate", |
@@ -975,2 +975,9 @@ /*! https://mths.be/regenerate v1.2.0 by @mathias | MIT license */ | ||
if (bmpOnly) { | ||
bmp = dataAddData(bmp, loneHighSurrogates); | ||
hasLoneHighSurrogates = false; | ||
bmp = dataAddData(bmp, loneLowSurrogates); | ||
hasLoneLowSurrogates = false; | ||
} | ||
if (!dataIsEmpty(bmp)) { | ||
@@ -991,3 +998,3 @@ // The data set contains BMP code points that are not high surrogates | ||
// Make sure the high surrogates aren’t part of a surrogate pair. | ||
(bmpOnly ? '' : '(?![\\uDC00-\\uDFFF])') | ||
'(?![\\uDC00-\\uDFFF])' | ||
); | ||
@@ -998,3 +1005,3 @@ } | ||
// Make sure the low surrogates aren’t part of a surrogate pair. | ||
(bmpOnly ? '' : '(?:[^\\uD800-\\uDBFF]|^)') + | ||
'(?:[^\\uD800-\\uDBFF]|^)' + | ||
createBMPCharacterClasses(loneLowSurrogates) | ||
@@ -1001,0 +1008,0 @@ ); |
46797
1066