diff --git a/lib/screw.builder.js b/lib/screw.builder.js index 6686993..3b4700d 100644 --- a/lib/screw.builder.js +++ b/lib/screw.builder.js @@ -1,7 +1,7 @@ var Screw = (function($) { var screw = { Unit: function(fn) { - var contents = fn.toString().match(/^[^\{]*{((.*\n*)*)}/m)[1]; + var contents = fn.toString().match(/^[^\{]*{((.*(\n|\r)*)*)}/m)[1]; var fn = new Function("matchers", "specifications", "with (specifications) { with (matchers) { " + contents + " } }" );