mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-19 18:59:42 +00:00
3825e2579f
* feat: new text substitution support, first pass * fix: use the widget method instead of evaluating a filter * revert to earlier implementation that emulates macro syntax * fix: capitalize comments * feat: add support for triple backticks for substituted attributes * docs: added docs for substitute operator * chore: more docs tweaks * docs: substituted attributes, refactored docs for widget attributes * docs: fixed typo * docs: more examples for substituted attributes * docs: updated prior documentation on concatenating text and variables * docs: documentation corrections * Update editions/tw5.com/tiddlers/filters/examples/substitute Operator (Examples).tid Co-authored-by: btheado <brian.theado@gmail.com> --------- Co-authored-by: btheado <brian.theado@gmail.com>
16 lines
769 B
Plaintext
16 lines
769 B
Plaintext
created: 20230615045132842
|
|
modified: 20230615045231048
|
|
tags: WikiText [[Widget Attributes]]
|
|
title: Filtered Attribute Values
|
|
type: text/vnd.tiddlywiki
|
|
|
|
Filtered attribute values are indicated with triple curly braces around a [[Filter Expression]]. The value will be the first item in the resulting list, or the empty string if the list is empty.
|
|
|
|
<<.from-version "5.2.2">> To improve readability, newlines can be included anywhere that whitespace is allowed within filtered attributes.
|
|
|
|
This example shows how to add a prefix to a value:
|
|
|
|
```
|
|
<$text text={{{ [<currentTiddler>addprefix[$:/myprefix/]] }}} />
|
|
```
|
|
<<.warning "The value of the attribute will be the exact text from the first item in the resulting list. Any wiki syntax in that text will be left as-is.">> |