[Pkg-javascript-commits] [less.js] 03/25: Adding handling for upper case drive letter in Windows

Jonas Smedegaard dr at jones.dk
Mon Oct 26 23:22:59 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag v1.7.4
in repository less.js.

commit b7224670c936591bc22ae4557ba51472c0f44d9f
Author: Miguel Castillo <manchagnu at gmail.com>
Date:   Fri Jul 11 18:36:03 2014 -0400

    Adding handling for upper case drive letter in Windows
    
    The check fails when the path starts with a Windows letter drive that’s
    upper case, causing the path to then include the currentDirectory.
    This fails when a rootPath is specified along with an import statements
    like:
    
    @import url("brackets_colors.less");
---
 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 b709885..6a3fde3 100644
--- a/lib/less/browser.js
+++ b/lib/less/browser.js
@@ -469,7 +469,7 @@ function doXHR(url, type, callback, errback) {
 
 function loadFile(originalHref, currentFileInfo, callback, env, modifyVars) {
 
-    if (currentFileInfo && currentFileInfo.currentDirectory && !/^([a-z-]+:)?\//.test(originalHref)) {
+    if (currentFileInfo && currentFileInfo.currentDirectory && !/^([A-Za-z-]+:)?\//.test(originalHref)) {
         originalHref = currentFileInfo.currentDirectory + originalHref;
     }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git



More information about the Pkg-javascript-commits mailing list