From c67807fa9a8864e46065feaca543e51244903879 Mon Sep 17 00:00:00 2001 From: Luiz Fernando Oliveira Corte Real Date: Mon, 23 Jun 2014 15:25:22 -0300 Subject: [PATCH] Accepting windows line end. Fixes #3 --- lib/screw.builder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 + " } }" );