From b6106ee4d9b670bf94363a30bb5b75b4c4f8fa9c Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sat, 31 Jan 2026 18:19:19 +0000 Subject: [PATCH] Extend enlist/enlist-input to recognise "all" suffix --- core/modules/filters/enlist.js | 2 ++ core/modules/filters/strings.js | 2 +- editions/tw5.com/tiddlers/filters/enlist Operator.tid | 2 +- editions/tw5.com/tiddlers/filters/enlist-input Operator.tid | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/modules/filters/enlist.js b/core/modules/filters/enlist.js index 69aa9e9e0d..aa4eecc198 100644 --- a/core/modules/filters/enlist.js +++ b/core/modules/filters/enlist.js @@ -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": diff --git a/core/modules/filters/strings.js b/core/modules/filters/strings.js index 854c43b8c6..8863a2672e 100644 --- a/core/modules/filters/strings.js +++ b/core/modules/filters/strings.js @@ -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( diff --git a/editions/tw5.com/tiddlers/filters/enlist Operator.tid b/editions/tw5.com/tiddlers/filters/enlist Operator.tid index a23a30e64c..becdee6843 100644 --- a/editions/tw5.com/tiddlers/filters/enlist Operator.tid +++ b/editions/tw5.com/tiddlers/filters/enlist Operator.tid @@ -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 diff --git a/editions/tw5.com/tiddlers/filters/enlist-input Operator.tid b/editions/tw5.com/tiddlers/filters/enlist-input Operator.tid index aa35f8f1c0..d52eaad350 100644 --- a/editions/tw5.com/tiddlers/filters/enlist-input Operator.tid +++ b/editions/tw5.com/tiddlers/filters/enlist-input Operator.tid @@ -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