mirror of
https://github.com/less/less.js.git
synced 2026-01-22 21:58:14 -05:00
Make sass-debug-info compatible with DevTools
In order to make the debug info compatible with Chrome's built-in experimental Sass support: 1) The filename must be a file:// URL 2) The path must be escaped rather than quoted
This commit is contained in:
@@ -23,7 +23,9 @@ tree.debugInfo.asComment = function(ctx) {
|
||||
};
|
||||
|
||||
tree.debugInfo.asMediaQuery = function(ctx) {
|
||||
return '@media -sass-debug-info{filename{font-family:"' + ctx.debugInfo.fileName + '";}line{font-family:"' + ctx.debugInfo.lineNumber + '";}}\n';
|
||||
return '@media -sass-debug-info{filename{font-family:' +
|
||||
('file://' + ctx.debugInfo.fileName).replace(/[\/:.]/g, '\\$&') +
|
||||
'}line{font-family:\\00003' + ctx.debugInfo.lineNumber + '}}\n';
|
||||
};
|
||||
|
||||
tree.find = function (obj, fun) {
|
||||
|
||||
Reference in New Issue
Block a user