From 15303674c6fe48dc89a90e197eba2ba899410693 Mon Sep 17 00:00:00 2001 From: Jelte Fennema Date: Sun, 17 Jan 2016 21:03:10 +0100 Subject: [PATCH] Make fnTest not match _super in line comments Multiline comments are much harder to distinguish with a regex. This is probably an indication that the current method of testing wether super is used in a method is not very good. Maybe another method needs to be found. --- backbone-super/backbone-super.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backbone-super/backbone-super.js b/backbone-super/backbone-super.js index 9562638..baf4107 100644 --- a/backbone-super/backbone-super.js +++ b/backbone-super/backbone-super.js @@ -30,7 +30,7 @@ }; var unImplementedSuper = function(method){throw "Super does not implement this method: " + method;}; - var fnTest = /\b_super\b/; + var fnTest = /((?!\/\/).)*?\b_super\b/m; var makeWrapper = function(parentProto, name, fn) { var wrapper = function() {