Permalink
Browse files

Merge pull request #828 from icambron/better_class_checking

changing how class escaping works
  • Loading branch information...
2 parents ce055dd + 217e52c commit 5aef2bf79c002e1d82f9a453698cd6f8d861ad22 @tj tj committed Jan 9, 2013
Showing with 5 additions and 4 deletions.
  1. +2 −2 lib/compiler.js
  2. +1 −1 test/cases/attrs.html
  3. +2 −1 test/cases/attrs.jade
View
@@ -601,11 +601,11 @@ Compiler.prototype = {
if (classes.length) {
classes = classes.join(" + ' ' + ");
- buf.push("class: " + classes);
+ buf.push('"class": ' + classes);
}
return {
- buf: buf.join(', ').replace('class:', '"class":'),
+ buf: buf.join(', '),
escaped: JSON.stringify(escaped),
inherits: inherits,
constant: constant
@@ -2,4 +2,4 @@
<select>
<option value="foo" selected="selected">Foo</option>
<option selected="selected" value="bar">Bar</option>
-</select>
+</select><a foo="class:"></a>
@@ -5,4 +5,5 @@ a(foo='foo, bar, baz', bar=1)
a(foo='((foo))', bar= (1) ? 1 : 0 )
select
option(value='foo', selected) Foo
- option(selected, value='bar') Bar
+ option(selected, value='bar') Bar
+a(foo="class:")

0 comments on commit 5aef2bf

Please sign in to comment.