mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-01-25 05:51:01 -08:00
Release note
This commit is contained in:
parent
3b84a7042c
commit
73cd48cada
1 changed files with 34 additions and 0 deletions
34
editions/tw5.com/tiddlers/releasenotes/5.4.0/#9595.tid
Normal file
34
editions/tw5.com/tiddlers/releasenotes/5.4.0/#9595.tid
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
title: $:/changenotes/5.4.0/#9595
|
||||
description: Easier avoidance of deduplication in filters
|
||||
release: 5.4.0
|
||||
tags: $:/tags/ChangeNote
|
||||
change-type: enhancement
|
||||
change-category: filters
|
||||
github-links: https://github.com/TiddlyWiki/TiddlyWiki5/pull/9595
|
||||
github-contributors: Jermolene
|
||||
|
||||
Resolves a long-standing issue with filters where there has been no easy way to avoid deduplication of results during filter evaluation. There are two distinct new capabilities.
|
||||
|
||||
First, there is a new filter pragma `::defaultprefix` that sets the default filter run prefix for the remainder of the filter expression. Filter pragmas are a new concept akin to wikitext pragmas, allowing special instructions to be embedded in filter expressions.
|
||||
|
||||
The `::defaultprefix` pragma takes as its first parameter the desired default filter run prefix, followed by any number of filter operations to which it applies. The default prefix `all` can be used to disable deduplication for the subsequent operations (`or` is the default prefix that performs deduplication).
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
::defaultprefix:all 1 2 2 1 4 +[join[ ]]
|
||||
```
|
||||
|
||||
Returns `1 2 2 1 4`.
|
||||
|
||||
Contrast to the result without the pragma which returns `2 1 4`:
|
||||
|
||||
```
|
||||
1 2 2 1 4 +[join[ ]]
|
||||
```
|
||||
|
||||
Second, there is a new parameter to the `subfilter` and `filter` operators to specify the default filter run prefix to use when the filter is evaluated. This overrides any default set with the `::defaultprefix` pragma.
|
||||
|
||||
```
|
||||
[subfilter:all<my-subfilter>]
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue