From 6d509e432b19e2468e07401d8783a708d5fd6efb Mon Sep 17 00:00:00 2001 From: Neno Date: Sun, 31 Jul 2011 14:04:04 +0100 Subject: [PATCH] Fix L.DomUtil.removeClasss method. Regex wasn't matching '-' chars in class names. --- src/dom/DomUtil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dom/DomUtil.js b/src/dom/DomUtil.js index 025a5d50..0528153d 100644 --- a/src/dom/DomUtil.js +++ b/src/dom/DomUtil.js @@ -86,7 +86,7 @@ L.DomUtil = { }, removeClass: function(el, name) { - el.className = el.className.replace(/(\w+)\s*/g, function(w, match) { + el.className = el.className.replace(/(\S+)\s*/g, function(w, match) { if (match == name) return ''; return w; }).replace(/^\s+/, '');