From ec4b9796b9b3f2c7f212ec2906b00231570d1b42 Mon Sep 17 00:00:00 2001 From: Adi Date: Tue, 1 Nov 2016 14:06:41 +0000 Subject: [PATCH] fixes #300 --- src/checkstyle/Checker.hx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/checkstyle/Checker.hx b/src/checkstyle/Checker.hx index 0ab5300c..a1ec9ebc 100644 --- a/src/checkstyle/Checker.hx +++ b/src/checkstyle/Checker.hx @@ -282,10 +282,11 @@ class Checker { var cls = file.name.substring(0, file.name.indexOf(".hx")); if (excludesForCheck.contains(cls)) return true; - cls = cls.replace("/", ":"); + var slashes:EReg = ~/[\/\\]/g; + cls = slashes.replace(cls, ":"); for (exclude in excludesForCheck) { - var regStr:String = exclude + ":.*?" + cls.substring(cls.lastIndexOf(":") + 1, cls.length) + "$"; - var r = new EReg(regStr.replace("/", ":"), "i"); + var regStr:String = slashes.replace(exclude, ":") + ":.*?" + cls.substring(cls.lastIndexOf(":") + 1, cls.length) + "$"; + var r = new EReg(regStr, "i"); if (r.match(cls)) return true; } return false;