[Pkg-javascript-commits] [less.js] 03/14: Prevent double protocol in debug info. Fixes #2383
Jonas Smedegaard
dr at jones.dk
Mon Oct 26 23:29:15 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag v2.3.1
in repository less.js.
commit 7eb3d636321f494bf08a76583b602120b3f28748
Author: Luke Page <luke.a.page at gmail.com>
Date: Tue Jan 27 17:35:33 2015 +0000
Prevent double protocol in debug info. Fixes #2383
---
lib/less/tree/debug-info.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/less/tree/debug-info.js b/lib/less/tree/debug-info.js
index 2b9292a..1e79f3d 100644
--- a/lib/less/tree/debug-info.js
+++ b/lib/less/tree/debug-info.js
@@ -21,8 +21,12 @@ debugInfo.asComment = function(ctx) {
};
debugInfo.asMediaQuery = function(ctx) {
+ var filenameWithProtocol = ctx.debugInfo.fileName;
+ if (!/^[a-z]+:\/\//i.test(filenameWithProtocol)) {
+ filenameWithProtocol = 'file://' + filenameWithProtocol;
+ }
return '@media -sass-debug-info{filename{font-family:' +
- ('file://' + ctx.debugInfo.fileName).replace(/([.:\/\\])/g, function (a) {
+ filenameWithProtocol.replace(/([.:\/\\])/g, function (a) {
if (a == '\\') {
a = '\/';
}
--
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