Skip to content

Commit

Permalink
[lib] whitespace tolerance for attributes, [test] tests added
Browse files Browse the repository at this point in the history
  • Loading branch information
Paolo Fragomeni committed Aug 25, 2012
1 parent bd6c68c commit 0848e61
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/plates.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ var Plates = (typeof module !== 'undefined' && typeof module.exports !== 'undefi
//
// HTML attribute parser.
//
attr: /([\-\w]*)=(?:["\']([\-\.\w\s\/:;&#]*)["\'])/gi,
attr: /([\-\w]*)\s*=\s*(?:["\']([\-\.\w\s\/:;&#]*)["\'])/gi,

//
// In HTML5 it's allowed to have to use self closing tags without closing
Expand Down
11 changes: 11 additions & 0 deletions test/api-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,17 @@ vows.describe('merge data into markup').addBatch({

return common.createTest('test-37', map);
}()
),
'(38) spaces in attributes': (

function() {

var map = Plates.Map();
map.class('inner').use('inner');

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

}()
)
}

Expand Down

0 comments on commit 0848e61

Please sign in to comment.