Skip to content

Commit

Permalink
Changed the way functionBody works
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Young committed Oct 22, 2009
1 parent b66b8f8 commit ecc0bfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion riot.js
Expand Up @@ -43,7 +43,7 @@ var Riot = {
},

functionBody: function(fn) {
return fn.toString().match(/^[^\{]*{((.*\n*)*)}/m)[1];
return '(' + fn.toString().replace(/\s+$/, '') + ')()';
},

withDSL: function(fn, context) {
Expand Down

0 comments on commit ecc0bfc

Please sign in to comment.