diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-04-01 17:41:19 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-04-01 17:41:19 +0100 |
| commit | ed3b8e8d620405cd813c08ddd73cecd645d67f09 (patch) | |
| tree | e3f81d8c30a7909ee3d4bf2f520bf3635f5b15c9 /lib/style-reader.js | |
| parent | bd8b2786247308c7bd82dc3cda627a23b4898958 (diff) | |
Add a proper attributes value for HTML elements
Diffstat (limited to 'lib/style-reader.js')
| -rw-r--r-- | lib/style-reader.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/style-reader.js b/lib/style-reader.js index a566826..9e23abd 100644 --- a/lib/style-reader.js +++ b/lib/style-reader.js @@ -33,14 +33,15 @@ function read(string) { capture(lop.rules.zeroOrMore(classRule)), capture(freshRule) ).map(function(tagName, classNames, fresh) { + var attributes = {}; var options = {}; if (classNames.length > 0) { - options["class"] = classNames.join(" "); + attributes["class"] = classNames.join(" "); } if (fresh) { options["fresh"] = true; } - return styles.element(tagName, options); + return styles.element(tagName, attributes, options); }); var styleRule = lop.rules.then( |
