Skip to content

Commit

Permalink
feat: allow any whitespace character to separate multiple styles (#226)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ngub authored and gajus committed Apr 2, 2017
1 parent 7d54625 commit b5d84c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parseStyleName.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default (styleNamePropertyValue: string, allowMultiple: boolean): Array<s
if (styleNameIndex[styleNamePropertyValue]) {
styleNames = styleNameIndex[styleNamePropertyValue];
} else {
styleNames = _.trim(styleNamePropertyValue).split(' ');
styleNames = _.trim(styleNamePropertyValue).split(/\s+/);
styleNames = _.filter(styleNames);

styleNameIndex[styleNamePropertyValue] = styleNames;
Expand Down

0 comments on commit b5d84c1

Please sign in to comment.