mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-05-01 01:31:26 -07:00
"dedupe" and "raw" suffixes for enlist-input operator (#5152)
Includes unit tests.
This commit is contained in:
parent
8fc6910c03
commit
fd3e77d38f
4 changed files with 10 additions and 3 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue