Apply filters
You can apply filters to a block of text using automation scripting in two ways.
First, you can wrap a text block in the apply
tag.
-
start: return: output@text: {% apply upper %} All of this text will be uppercase. On every line. {% endapply %}
-
__return: output: | ALL OF THIS TEXT WILL BE UPPERCASE. ON EVERY LINE.
Alternatively, you can chain multiple filters together with the pipe (|
) character. This can be useful when creating snippets.
-
start: set: text@text: ALL OF THIS TEXT WILL BE LOWER CASE. ON EVERY LINE. WITH A >. AT THE START OF EACH LINE. return: output: {{text|lower|indent('> ')}}
-
__return: output: | > all of this text will be lower case > on every line. > with a >. > at the start of each line.