Skip to content

Commit b57ac0c

Browse files
committed
Don't use ES6 notation.
1 parent 2250175 commit b57ac0c

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
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.1.0",
4+
"version": "1.1.1",
55
"license": "BSD-3",
66
"repository": {
77
"type": "git",

src/react-inline-css.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* @copyright © 2015, Rick Wong. All rights reserved.
3+
*/
14
var React = require("react");
25

36
var refCounter = 0;
@@ -12,17 +15,17 @@ var InlineCss = React.createClass({
1215
namespace: React.PropTypes.string,
1316
wrapper: React.PropTypes.string
1417
},
15-
_transformSheet(stylesheet, namespace) {
18+
_transformSheet: function (stylesheet, namespace) {
1619
return stylesheet.
1720
// Prettier output.
1821
replace(/}\s*/ig, '\n}\n').
1922
// Regular rules are namespaced.
2023
replace(
2124
/(^|}|;|,)\s*([&a-z0-9\-_\.:#\(\),>*\s]+)\s*(\{)/ig,
22-
(matched) => matched.replace(/&/g, `#${namespace}`)
25+
function (matched) { return matched.replace(/&/g, "#" + namespace); }
2326
);
2427
},
25-
render() {
28+
render: function () {
2629
var Wrapper = this.props.wrapper || "div";
2730
var namespace = this.props.namespace || "InlineCss-" + refCounter++;
2831
var transformedSheet = this._transformSheet(this.props.stylesheet, namespace);

tmp/.gitignore

Whitespace-only changes.

0 commit comments

Comments
 (0)