File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -5,25 +5,26 @@ var through = require('through2');
5
5
* of the plotly.js bundles
6
6
*/
7
7
8
+ var OPTIONAL_COMMA = ',?' ;
8
9
9
10
// one line string with or without trailing comma
10
11
function makeStringRegex ( attr ) {
11
12
return makeRegex (
12
- attr + ': \'.*\'' + ',?'
13
+ attr + ': \'.*\'' + OPTIONAL_COMMA
13
14
) ;
14
15
}
15
16
16
17
// joined array of strings with or without trailing comma
17
18
function makeJoinedArrayRegex ( attr ) {
18
19
return makeRegex (
19
- attr + ': \\[[\\s\\S]*?\\]' + '\\.join\\(.*' + ',?'
20
+ attr + ': \\[[\\s\\S]*?\\]' + '\\.join\\(.*' + OPTIONAL_COMMA
20
21
) ;
21
22
}
22
23
23
24
// array with or without trailing comma
24
25
function makeArrayRegex ( attr ) {
25
26
return makeRegex (
26
- attr + ': \\[[\\s\\S]*?\\]' + ',?'
27
+ attr + ': \\[[\\s\\S]*?\\]' + OPTIONAL_COMMA
27
28
) ;
28
29
}
29
30
You can’t perform that action at this time.
0 commit comments