File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 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');
55 * of the plotly.js bundles
66 */
77
8+ var OPTIONAL_COMMA = ',?' ;
89
910// one line string with or without trailing comma
1011function makeStringRegex ( attr ) {
1112 return makeRegex (
12- attr + ': \'.*\'' + ',?'
13+ attr + ': \'.*\'' + OPTIONAL_COMMA
1314 ) ;
1415}
1516
1617// joined array of strings with or without trailing comma
1718function makeJoinedArrayRegex ( attr ) {
1819 return makeRegex (
19- attr + ': \\[[\\s\\S]*?\\]' + '\\.join\\(.*' + ',?'
20+ attr + ': \\[[\\s\\S]*?\\]' + '\\.join\\(.*' + OPTIONAL_COMMA
2021 ) ;
2122}
2223
2324// array with or without trailing comma
2425function makeArrayRegex ( attr ) {
2526 return makeRegex (
26- attr + ': \\[[\\s\\S]*?\\]' + ',?'
27+ attr + ': \\[[\\s\\S]*?\\]' + OPTIONAL_COMMA
2728 ) ;
2829}
2930
You can’t perform that action at this time.
0 commit comments