mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 12:07:19 +00:00
Add new [all[tags]] filter operator
This commit is contained in:
parent
c02c3a06e0
commit
a3dc3b4b98
22
core/modules/filters/all/tags.js
Normal file
22
core/modules/filters/all/tags.js
Normal file
@ -0,0 +1,22 @@
|
||||
/*\
|
||||
title: $:/core/modules/filters/all/tags.js
|
||||
type: application/javascript
|
||||
module-type: allfilteroperator
|
||||
|
||||
Filter function for [all[tags]]
|
||||
|
||||
\*/
|
||||
(function(){
|
||||
|
||||
/*jslint node: true, browser: true */
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
/*
|
||||
Export our filter function
|
||||
*/
|
||||
exports.tags = function(source,prefix,options) {
|
||||
return Object.keys(options.wiki.getTagMap());
|
||||
};
|
||||
|
||||
})();
|
@ -1,13 +1,13 @@
|
||||
caption: all
|
||||
created: 20140410103123179
|
||||
modified: 20150220160957000
|
||||
modified: 20161128185445034
|
||||
op-input: ignored, unless the parameter is empty
|
||||
op-output: the titles that belong to all the specified categories
|
||||
op-parameter: zero or more categories
|
||||
op-purpose: find all titles of a fundamental category
|
||||
tags: [[Filter Operators]] [[Common Operators]] [[Selection Constructors]]
|
||||
title: all Operator
|
||||
type: text/vnd.tiddlywiki
|
||||
caption: all
|
||||
op-purpose: find all titles of a fundamental category
|
||||
op-input: ignored, unless the parameter is empty
|
||||
op-parameter: zero or more categories
|
||||
op-output: the titles that belong to all the specified categories
|
||||
|
||||
The parameter specifies zero or more fundamental categories using the following syntax:
|
||||
|
||||
@ -21,6 +21,7 @@ The parameter specifies zero or more fundamental categories using the following
|
||||
|^`orphans` |all tiddlers to which there are <<.em no>> hard links |^by title |
|
||||
|^`shadows` |all the [[shadow tiddlers|ShadowTiddlers]] that exist, including any that have been overridden with non-shadow tiddlers |^no |
|
||||
|^`tiddlers` |all the non-shadow tiddlers that exist |no |
|
||||
|^`tags` |all the tags in use on non-shadow tiddlers |no |
|
||||
|
||||
If the parameter specifies more than one category, they are processed from left to right. The overall output is initially empty, and each category's output is [[dominantly appended|Dominant Append]] to it in turn. Unrecognised categories contribute nothing to the output.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user