File tree 3 files changed +63
-2
lines changed
3 files changed +63
-2
lines changed Original file line number Diff line number Diff line change 1
1
Babel Changelog
2
2
===============
3
3
4
+ Version 2.10.0
5
+ --------------
6
+
7
+ (Feature releaser released on May 22nd 2021)
8
+
9
+ Improvements
10
+ ~~~~~~~~~~~~
11
+
12
+ * Support for javascript template strings
13
+
14
+
4
15
Version 2.9.0
5
16
-------------
6
17
Original file line number Diff line number Diff line change 21
21
negotiate_locale , parse_locale , get_locale_identifier
22
22
23
23
24
- __version__ = '2.9 .0'
24
+ __version__ = '2.10 .0'
Original file line number Diff line number Diff line change 25
25
name_re = re .compile (r'[\w$_][\w\d$_]*' , re .UNICODE )
26
26
dotted_name_re = re .compile (r'[\w$_][\w\d$_.]*[\w\d$_.]' , re .UNICODE )
27
27
division_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
+
29
79
line_re = re .compile (r'(\r\n|\n|\r)' )
30
80
line_join_re = re .compile (r'\\' + line_re .pattern )
31
81
uni_escape_re = re .compile (r'[a-fA-F0-9]{1,4}' )
You can’t perform that action at this time.
0 commit comments