[Pkg-javascript-commits] [less.js] 57/88: minor `replace` func improvement: preserve quote char and escaped flag.
Jonas Smedegaard
dr at jones.dk
Mon Oct 26 23:22:26 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag v1.7.0
in repository less.js.
commit d3c0b204c7c2d7071474a4c1b3a4dc5560b3be35
Author: seven-phases-max <seven.phases.max at gmail.com>
Date: Tue Feb 18 15:22:14 2014 +0400
minor `replace` func improvement: preserve quote char and escaped flag.
---
lib/less/functions.js | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/less/functions.js b/lib/less/functions.js
index 413ae98..552f052 100644
--- a/lib/less/functions.js
+++ b/lib/less/functions.js
@@ -222,8 +222,7 @@ tree.functions = {
var str = subject.value;
str = str.replace(new RegExp(pattern.value, flags ? flags.value : ""), replacement.value);
-
- return new(tree.Quoted)('"' + str + '"', str);
+ return new(tree.Quoted)(subject.quote || '', str, subject.escaped);
},
'%': function (quoted /* arg, arg, ...*/) {
var args = Array.prototype.slice.call(arguments, 1),
--
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