Skip to content

Commit

Permalink
Merge pull request #86 from samikarak/master
Browse files Browse the repository at this point in the history
fix(utilities): allow numbers in custom style names
  • Loading branch information
remarkablemark authored Jan 3, 2019
2 parents a6cd723 + 5a6600f commit 84cc697
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utilities.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var React = require('react');
var hyphenPatternRegex = /-([a-z])/g;
var CUSTOM_PROPERTY_OR_NO_HYPHEN_REGEX = /^--[a-zA-Z-]+$|^[^-]+$/;
var CUSTOM_PROPERTY_OR_NO_HYPHEN_REGEX = /^--[a-zA-Z0-9-]+$|^[^-]+$/;

/**
* Converts a string to camelCase.
Expand Down
2 changes: 2 additions & 0 deletions test/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ describe('utilties.camelCase', () => {
assert.equal(camelCase('fooBar'), 'fooBar');
assert.equal(camelCase('--fooBar'), '--fooBar');
assert.equal(camelCase('--foo-bar'), '--foo-bar');
assert.equal(camelCase('--foo100'), '--foo100');
assert.equal(camelCase('--foo-100'), '--foo-100');
});

it('camelCases a string', () => {
Expand Down

0 comments on commit 84cc697

Please sign in to comment.