Skip to content

Commit 6ed94f1

Browse files
author
Rick
committed
Fixes RickWong#6: not namespacing the first embedded rule.
1 parent 474547b commit 6ed94f1

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-inline-css",
33
"description": "Inline CSS in your React components, namespaced automatically.",
4-
"version": "1.2.0",
4+
"version": "1.2.1",
55
"license": "BSD-3-Clause",
66
"repository": {
77
"type": "git",
@@ -12,7 +12,8 @@
1212
"react",
1313
"inline",
1414
"css",
15-
"react-component"
15+
"react-component",
16+
"style"
1617
],
1718
"main": "src/react-inline-css",
1819
"scripts": {
@@ -25,12 +26,12 @@
2526
"react": ">= 0.12.0"
2627
},
2728
"devDependencies": {
28-
"babel-core": "5.8.8",
29+
"babel-core": "5.8.22",
2930
"babel-loader": "5.3.2",
3031
"concurrently": "0.1.1",
3132
"json-loader": "0.5.2",
3233
"react-hot-loader": "1.2.8",
33-
"webpack": "1.10.5",
34+
"webpack": "1.11.0",
3435
"webpack-dev-server": "1.10.1"
3536
}
3637
}

src/react-inline-css.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var InlineCss = React.createClass({
2222
replace(/}\s*/ig, '\n}\n').
2323
// Regular rules are namespaced.
2424
replace(
25-
/(^|}|;|,)\s*([&a-z0-9\-_\.:#\(\),>*\s]+)\s*(\{)/ig,
25+
/(^|{|}|;|,)\s*([&a-z0-9\-_\.:#\(\),>*\s]+)\s*(\{)/ig,
2626
function (matched) {
2727
return matched.replace(componentName, "#" + namespace);
2828
}

0 commit comments

Comments
 (0)