[build-path-prefix-map-spec] 38/50: Don't need to escape . inside a character class

Ximin Luo infinity0 at debian.org
Fri Mar 10 15:17:22 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository build-path-prefix-map-spec.

commit 19d02532db5d82f9f584b43e4aee456d0e57fd41
Author: Ximin Luo <infinity0 at debian.org>
Date:   Thu Feb 23 20:44:48 2017 +0100

    Don't need to escape . inside a character class
---
 consume/pecsplit.js | 2 +-
 consume/pecsplit.py | 2 +-
 spec-draft.rst      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/consume/pecsplit.js b/consume/pecsplit.js
index 43effcf..5c2d500 100755
--- a/consume/pecsplit.js
+++ b/consume/pecsplit.js
@@ -3,7 +3,7 @@
 // Parsing the variable
 
 var unquote = function(x) {
-  if (x.search(/%[^#+\.]|%$/) >= 0)
+  if (x.search(/%[^#+.]|%$/) >= 0)
     throw "invalid value: bad escape: " + x;
   return x.replace(/%\./g, ':').replace(/%\+/g, '=').replace(/%#/g, '%');
 };
diff --git a/consume/pecsplit.py b/consume/pecsplit.py
index 5da172d..5c7fe6e 100755
--- a/consume/pecsplit.py
+++ b/consume/pecsplit.py
@@ -7,7 +7,7 @@ import sys
 # Parsing the variable
 
 def _dequote(part):
-  if re.search(r"%[^#+\.]|%$", part):
+  if re.search(r"%[^#+.]|%$", part):
     raise ValueError("bad escape: %s" % part)
   return part.replace("%.", ':').replace("%+", '=').replace("%#", '%');
 
diff --git a/spec-draft.rst b/spec-draft.rst
index 335da31..8ee7264 100644
--- a/spec-draft.rst
+++ b/spec-draft.rst
@@ -83,7 +83,7 @@ The encoding is as follows:
 
   A. decoding:
 
-     1. check elem does not match the regex ``/%[^#+\.]|%$/g``, then
+     1. check elem does not match the regex ``/%[^#+.]|%$/g``, then
      2. ``elem.replace("%.", ':').replace("%+", '=').replace("%#", '%')``
 
   B. encoding:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/build-path-prefix-map-spec.git



More information about the Reproducible-commits mailing list