[Pkg-javascript-commits] [node-regenerate] 01/08: New upstream version 1.3.3
Julien Puydt
julien.puydt at laposte.net
Sun Sep 24 18:43:59 UTC 2017
This is an automated email from the git hooks/post-receive script.
jpuydt-guest pushed a commit to branch master
in repository node-regenerate.
commit b56d4f55cc31d7151a35a5d6a85a2d6ff3b810fb
Author: Julien Puydt <julien.puydt at laposte.net>
Date: Sun Sep 24 20:31:59 2017 +0200
New upstream version 1.3.3
---
bower.json | 2 +-
component.json | 2 +-
package.json | 2 +-
regenerate.js | 9 +++++----
tests/tests.js | 9 +++++++--
5 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/bower.json b/bower.json
index c28771f..9055d42 100644
--- a/bower.json
+++ b/bower.json
@@ -1,6 +1,6 @@
{
"name": "regenerate",
- "version": "1.3.2",
+ "version": "1.3.3",
"main": "regenerate.js",
"ignore": [
"coverage",
diff --git a/component.json b/component.json
index c0f8095..cb53f50 100644
--- a/component.json
+++ b/component.json
@@ -1,6 +1,6 @@
{
"name": "regenerate",
- "version": "1.3.2",
+ "version": "1.3.3",
"description": "Generate JavaScript-compatible regular expressions based on a given set of Unicode symbols or code points.",
"repo": "mathiasbynens/regenerate",
"license": "MIT",
diff --git a/package.json b/package.json
index 95c0b03..5c1a6a6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "regenerate",
- "version": "1.3.2",
+ "version": "1.3.3",
"description": "Generate JavaScript-compatible regular expressions based on a given set of Unicode symbols or code points.",
"homepage": "https://mths.be/regenerate",
"main": "regenerate.js",
diff --git a/regenerate.js b/regenerate.js
index 2393988..fb849c5 100644
--- a/regenerate.js
+++ b/regenerate.js
@@ -1,4 +1,4 @@
-/*! https://mths.be/regenerate v1.3.2 by @mathias | MIT license */
+/*! https://mths.be/regenerate v1.3.3 by @mathias | MIT license */
;(function(root) {
// Detect free variables `exports`.
@@ -539,14 +539,15 @@
else if (
codePoint == 0x24 ||
(codePoint >= 0x28 && codePoint <= 0x2B) ||
- codePoint == 0x2D || codePoint == 0x2E || codePoint == 0x3F ||
+ (codePoint >= 0x2D && codePoint <= 0x2F) ||
+ codePoint == 0x3F ||
(codePoint >= 0x5B && codePoint <= 0x5E) ||
(codePoint >= 0x7B && codePoint <= 0x7D)
) {
// The code point maps to an unsafe printable ASCII character;
// backslash-escape it. Here’s the list of those symbols:
//
- // $()*+-.?[\]^{|}
+ // $()*+-./?[\]^{|}
//
// See #7 for more info.
string = '\\' + stringFromCharCode(codePoint);
@@ -1052,7 +1053,7 @@
return (new regenerate).add(value);
};
- regenerate.version = '1.3.2';
+ regenerate.version = '1.3.3';
var proto = regenerate.prototype;
extend(proto, {
diff --git a/tests/tests.js b/tests/tests.js
index 5257ab3..1aa0d20 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -370,8 +370,13 @@
'BMP code points within the a-zA-Z range, unordered'
);
equal(
- regenerate(0x20, 0x21, 0x23).toString(),
- '[ !#]',
+ regenerate(0x2F).toString(),
+ '\\/',
+ 'U+002F should be escaped to enable embedding in a literal'
+ );
+ equal(
+ regenerate(0x20, 0x21, 0x23, 0x2F).toString(),
+ '[ !#\\/]',
'Random BMP code points'
);
equal(
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-regenerate.git
More information about the Pkg-javascript-commits
mailing list