mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-02-01 23:47:35 +00:00
Extend enlist/enlist-input to recognise "all" suffix
This commit is contained in:
@@ -16,6 +16,8 @@ exports.enlist = function(source,operator,options) {
|
||||
var allowDuplicates = false;
|
||||
switch(operator.suffix) {
|
||||
case "raw":
|
||||
// Intentional fallthrough
|
||||
case "all":
|
||||
allowDuplicates = true;
|
||||
break;
|
||||
case "dedupe":
|
||||
|
||||
@@ -58,7 +58,7 @@ exports.split = makeStringBinaryOperator(
|
||||
);
|
||||
|
||||
exports["enlist-input"] = makeStringBinaryOperator(
|
||||
function(a,o,s) {return $tw.utils.parseStringArray("" + a,(s === "raw"));}
|
||||
function(a,o,s) {return $tw.utils.parseStringArray("" + a,(s === "raw" || s === "all"));}
|
||||
);
|
||||
|
||||
exports.join = makeStringReducingOperator(
|
||||
|
||||
@@ -8,7 +8,7 @@ op-output: the titles stored as a [[title list|Title List]] at <<.place L>>
|
||||
op-parameter: a [[title list|Title List]]
|
||||
op-parameter-name: L
|
||||
op-purpose: select titles from the parameter interpreted as a [[title list|Title List]]
|
||||
op-suffix: <<.from-version "5.1.20">> `dedupe` (the default) to remove duplicates, `raw` to leave duplicates untouched
|
||||
op-suffix: <<.from-version "5.1.20">> `dedupe` (the default) to remove duplicates, `all` (or `raw`) to leave duplicates untouched
|
||||
op-suffix-name: D
|
||||
tags: [[Filter Operators]] [[Field Operators]] [[Selection Constructors]] [[Negatable Operators]]
|
||||
title: enlist Operator
|
||||
|
||||
@@ -4,7 +4,7 @@ modified: 20201102221854719
|
||||
op-input: a [[selection of titles|Title Selection]]
|
||||
op-output: the titles stored as a [[title list|Title List]] in each input title
|
||||
op-purpose: select titles by interpreting each input title as a [[title list|Title List]]
|
||||
op-suffix: `dedupe` (the default) to remove duplicates, `raw` to leave duplicates untouched
|
||||
op-suffix: `dedupe` (the default) to remove duplicates, `all` (or `raw`) to leave duplicates untouched
|
||||
op-suffix-name: D
|
||||
tags: [[Filter Operators]] [[String Operators]]
|
||||
title: enlist-input Operator
|
||||
|
||||
Reference in New Issue
Block a user