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,26 +5,27 @@ var through = require('through2');
55 * of the plotly.js bundles
66 */
77
8+ var WHITESPACE_BEFORE = '\\s*' ;
89var OPTIONAL_COMMA = ',?' ;
910
1011// one line string with or without trailing comma
1112function makeStringRegex ( attr ) {
1213 return makeRegex (
13- attr + ': \'.*\'' + OPTIONAL_COMMA
14+ WHITESPACE_BEFORE + attr + ': \'.*\'' + OPTIONAL_COMMA
1415 ) ;
1516}
1617
1718// joined array of strings with or without trailing comma
1819function makeJoinedArrayRegex ( attr ) {
1920 return makeRegex (
20- attr + ': \\[[\\s\\S]*?\\]' + '\\.join\\(.*' + OPTIONAL_COMMA
21+ WHITESPACE_BEFORE + attr + ': \\[[\\s\\S]*?\\]' + '\\.join\\(.*' + OPTIONAL_COMMA
2122 ) ;
2223}
2324
2425// array with or without trailing comma
2526function makeArrayRegex ( attr ) {
2627 return makeRegex (
27- attr + ': \\[[\\s\\S]*?\\]' + OPTIONAL_COMMA
28+ WHITESPACE_BEFORE + attr + ': \\[[\\s\\S]*?\\]' + OPTIONAL_COMMA
2829 ) ;
2930}
3031
You can’t perform that action at this time.
0 commit comments