mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-01 16:13:00 +00:00
"dedupe" and "raw" suffixes for enlist-input operator (#5152)
Includes unit tests.
This commit is contained in:
@@ -61,7 +61,7 @@ exports.split = makeStringBinaryOperator(
|
||||
);
|
||||
|
||||
exports["enlist-input"] = makeStringBinaryOperator(
|
||||
function(a) {return $tw.utils.parseStringArray("" + a);}
|
||||
function(a,o,s) {return $tw.utils.parseStringArray("" + a,(s === "raw"));}
|
||||
);
|
||||
|
||||
exports.join = makeStringReducingOperator(
|
||||
@@ -78,7 +78,7 @@ function makeStringBinaryOperator(fnCalc) {
|
||||
return function(source,operator,options) {
|
||||
var result = [];
|
||||
source(function(tiddler,title) {
|
||||
Array.prototype.push.apply(result,fnCalc(title,operator.operand || ""));
|
||||
Array.prototype.push.apply(result,fnCalc(title,operator.operand || "",operator.suffix || ""));
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user