Skip to content

Commit

Permalink
Merge pull request knockout#95 from joeldart/dataAttributesFix
Browse files Browse the repository at this point in the history
fixed regex to allow data-* attributes besides data-bind (Thanks, JoelDart!)
  • Loading branch information
SteveSanderson committed May 12, 2011
2 parents 9e8e5d0 + 9ca55d4 commit d1acced
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/templating/templateRewriting.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

ko.templateRewriting = (function () {
var memoizeBindingAttributeSyntaxRegex = /(<[a-z]+\d*(\s+(?!data-bind=)[a-z0-9]+(=(\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind=(["'])([\s\S]*?)\5/gi;
var memoizeBindingAttributeSyntaxRegex = /(<[a-z]+\d*(\s+(?!data-bind=)[a-z0-9\-]+(=(\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind=(["'])([\s\S]*?)\5/gi;

return {
ensureTemplateIsRewritten: function (template, templateEngine) {
Expand Down

0 comments on commit d1acced

Please sign in to comment.