File tree Expand file tree Collapse file tree 3 files changed +60
-2
lines changed Expand file tree Collapse file tree 3 files changed +60
-2
lines changed Original file line number Diff line number Diff line change 11Babel Changelog
22===============
33
4+ Version 2.10.0
5+ --------------
6+
7+ Improvements
8+ ~~~~~~~~~~~~
9+
10+ * Support for javascript template strings
11+
412Version 2.9.1
513-------------
614
Original file line number Diff line number Diff line change 2121 negotiate_locale , parse_locale , get_locale_identifier
2222
2323
24- __version__ = '2.9.1 '
24+ __version__ = '2.10.0 '
Original file line number Diff line number Diff line change 2525name_re = re .compile (r'[\w$_][\w\d$_]*' , re .UNICODE )
2626dotted_name_re = re .compile (r'[\w$_][\w\d$_.]*[\w\d$_.]' , re .UNICODE )
2727division_re = re .compile (r'/=?' )
28- regex_re = re .compile (r'/(?:[^/\\]*(?:\\.[^/\\]*)*)/[a-zA-Z]*' , re .DOTALL )
28+
29+ regex_re = re .compile (
30+ r'''
31+
32+ # Opening slash of the regex
33+ /
34+
35+ (?:
36+
37+ # 1) Blackslashed character
38+ #
39+ # Match a backslash `\` and then it's following character, allowing
40+ # to blackslash the `/` for example.
41+ (?:\\.)?
42+
43+ |
44+
45+ # 2) Regex character class `[a-z]`
46+ #
47+ # Match regex character class, like `[a-z]`. Inside a character
48+ # class, a `/` character may appear, which does not close the
49+ # regex. Therefore we allow it here inside a character class.
50+ \[
51+ (?:
52+ [^\]]*
53+ |
54+ \\\]
55+ )*
56+ \]
57+
58+ |
59+
60+ # 3) Other characters
61+ #
62+ # Match anything except a closing slash `/`, a backslash `\`, or a
63+ # opening bracket `[`. Those last two will be handled by the other
64+ # matchers.
65+ [^/\\\[]*
66+
67+ )*
68+
69+ # Closing slash of the regex
70+ /
71+
72+ # regex flags
73+ [a-zA-Z]*
74+
75+ ''' ,
76+ re .DOTALL + re .VERBOSE
77+ )
78+
2979line_re = re .compile (r'(\r\n|\n|\r)' )
3080line_join_re = re .compile (r'\\' + line_re .pattern )
3181uni_escape_re = re .compile (r'[a-fA-F0-9]{1,4}' )
You can’t perform that action at this time.
0 commit comments