Fix for stylesheets having a '.' in their basename

This commit is contained in:
Victor Berchet 2010-07-01 22:33:48 +08:00 committed by Alexis Sellier
parent a35a5f69e9
commit 209b349552

View File

@ -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) {