From e29afee441b4018b5804898a427464d85fee3c64 Mon Sep 17 00:00:00 2001 From: Jorge Godoy Date: Mon, 12 Sep 2016 11:47:49 -0300 Subject: [PATCH] Don't convert VML urls. Copied from https://github.com/less/less-plugin-inline-urls --- lib/file-visitor.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/file-visitor.js b/lib/file-visitor.js index 4482d7c..b6b58f3 100644 --- a/lib/file-visitor.js +++ b/lib/file-visitor.js @@ -26,8 +26,13 @@ module.exports = function(less) { if (!this._inRule) { return URLNode; } + if (URLNode.value && URLNode.value.value && URLNode.value.value.indexOf('#') === 0) { + // Might be part of a VML url-node value like: + // ``behavior:url(#default#VML);`` + return URLNode; + } return new less.tree.Call('url', [new ParamStringReplacementNode(URLNode.value, options)], URLNode.index || 0, URLNode.currentFileInfo); } }; return SrcReplacement; -}; \ No newline at end of file +};