[Pkg-javascript-commits] [node-acorn-jsx] 151/484: Fixed: skipSpace did not consider 8232 and 8233 as eol, but elsewhere it was.

Bastien Roucariès rouca at moszumanska.debian.org
Sat Aug 19 14:20:18 UTC 2017


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

rouca pushed a commit to branch master
in repository node-acorn-jsx.

commit 6fd79e50fb606f73d624ca5bd382afde43dcea76
Author: Aparajita Fishman <aparajita at aparajita.com>
Date:   Tue Oct 8 09:51:39 2013 -0400

    Fixed: skipSpace did not consider 8232 and 8233 as eol, but elsewhere it was.
    
    Both readString and skipLineComment considered 8232/8233 as eol, but skipSpace itself would not increment the line counters if they were found.
    
    Previously 8232/8233 were listed in nonASCIIwhitespace, but since that is only used within skipSpace and those values are checked separately, they could be removed from nonASCIIwhitespace.
---
 acorn.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/acorn.js b/acorn.js
index 826378a..f479be8 100644
--- a/acorn.js
+++ b/acorn.js
@@ -409,7 +409,7 @@
   // are only applied when a character is found to actually have a
   // code point above 128.
 
-  var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]/;
+  var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
   var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u [...]
   var nonASCIIidentifierChars = "\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u0620-\u0649\u0672-\u06d3\u06e7-\u06e8\u06fb-\u06fc\u0730-\u074a\u0800-\u0814\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0840-\u0857\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962-\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09d7\u09df-\u09e0\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a8 [...]
   var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
@@ -527,7 +527,7 @@
           ++tokCurLine;
           tokLineStart = tokPos;
         }
-      } else if (ch === 10) {
+      } else if (ch === 10 || ch === 8232 || ch === 8233) {
         ++tokPos;
         ++tokCurLine;
         tokLineStart = tokPos;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-acorn-jsx.git



More information about the Pkg-javascript-commits mailing list