Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regexp #94

Merged
merged 2 commits into from Nov 28, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/plates.js
Expand Up @@ -146,7 +146,7 @@ function matchClosing(input, tagname, html) {
// In HTML5 it's allowed to have to use self closing tags without closing // In HTML5 it's allowed to have to use self closing tags without closing
// separators. So we need to detect these elements based on the tag name. // separators. So we need to detect these elements based on the tag name.
// //
selfClosing: /area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr/, selfClosing: /^(area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/,


// //
// ### function hasClass(str, className) // ### function hasClass(str, className)
Expand Down
11 changes: 11 additions & 0 deletions test/api-test.js
Expand Up @@ -493,6 +493,17 @@ vows.describe('merge data into markup').addBatch({


return common.createTest('test-40', map); return common.createTest('test-40', map);
}() }()
),

'(41) Should remove the correct element': (

function() {
var map = Plates.Map();

map.className('ssl').remove();

return common.createTest('test-41', map);
}()
) )
} }


Expand Down
20 changes: 20 additions & 0 deletions test/fixtures/test-41.html
@@ -0,0 +1,20 @@
<form class="ssl">
<fieldset>
<input type="text">
<textarea></textarea>
</fieldset>
<fieldset>
<input type="text">
<textarea></textarea>
</fieldset>
<fieldset>
<input type="text">
<textarea></textarea>
</fieldset>
</form>
<form>
<fieldset>
<input type="text">
<textarea></textarea>
</fieldset>
</form>
1 change: 1 addition & 0 deletions test/fixtures/test-41.json
@@ -0,0 +1 @@
{}
7 changes: 7 additions & 0 deletions test/fixtures/test-41.out
@@ -0,0 +1,7 @@

<form>
<fieldset>
<input type="text">
<textarea></textarea>
</fieldset>
</form>