xoxys.general/filters/prefix.md
Robert Kaussow 0fa31f8998 commit d88d71f073
Author: Robert Kaussow <mail@geeklabor.de>
Date:   Sat Aug 22 20:29:58 2020 +0200

    fix docs
2020-08-22 18:34:53 +00:00

376 B

Simple filter to prefix all items from a list. Default prefix will be -- but you can also pass a custom one.

Example

my_list:
  - item1
  - item2

{{ my_list | prefix | join(' ') }}

# result:
# "--item1 --item2"

Or pass a custom prefix:

my_list:
  - item1
  - item2

{{ my_list | prefix(prefix='-') | join(' ') }}

# result:
# "-item1 -item2"