From 209b3495522e3eb765776a23159e3c98a140e806 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Thu, 1 Jul 2010 22:33:48 +0800 Subject: [PATCH] Fix for stylesheets having a '.' in their basename --- lib/less/browser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/less/browser.js b/lib/less/browser.js index aa95797..063a927 100644 --- a/lib/less/browser.js +++ b/lib/less/browser.js @@ -147,7 +147,7 @@ function createCSS(styles, sheet, lastModified) { var href = sheet.href ? sheet.href.replace(/\?.*$/, '') : ''; // If there is no title set, use the filename, minus the extension - var id = 'less:' + (sheet.title || href.match(/(?:^|\/)([-\w]+)\.[a-z]+$/i)[1]); + var id = 'less:' + (sheet.title || href.match(/(?:^|\/)([-\w.]+)\.[a-z]+$/i)[1]); // If the stylesheet doesn't exist, create a new node if ((css = document.getElementById(id)) === null) {