Skip to content

Commit b5d84c1

Browse files
ngubgajus
authored andcommitted
feat: allow any whitespace character to separate multiple styles (gajus#226)
Currently it is impossible to use delimiters in styleName other than a single space symbol. The change allows to use any whitespace characters, such as a newline character which is handy if you use multiple class names in a single styleName attribute combined with ES6 string literal.
1 parent 7d54625 commit b5d84c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parseStyleName.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default (styleNamePropertyValue: string, allowMultiple: boolean): Array<s
88
if (styleNameIndex[styleNamePropertyValue]) {
99
styleNames = styleNameIndex[styleNamePropertyValue];
1010
} else {
11-
styleNames = _.trim(styleNamePropertyValue).split(' ');
11+
styleNames = _.trim(styleNamePropertyValue).split(/\s+/);
1212
styleNames = _.filter(styleNames);
1313

1414
styleNameIndex[styleNamePropertyValue] = styleNames;

0 commit comments

Comments
 (0)