mirror of
https://github.com/ansible/ansible.git
synced 2026-08-02 00:22:14 +02:00
split: Fix incorrect example result of the split builtin filter (#83982)
The following Python output proves that the second member of the resulting list should be " a", not "a":
```txt
$ python3
Python 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> string = "jojo is, a"
>>> string.split(',')
['jojo is', ' a']
```
This commit is contained in:
@@ -22,7 +22,7 @@ EXAMPLES: |
|
||||
# listjojo => [ "jojo", "is", "a" ]
|
||||
listjojo: "{{ 'jojo is a' | split }}"
|
||||
|
||||
# listjojocomma => [ "jojo is", "a" ]
|
||||
# listjojocomma => [ "jojo is", " a" ]
|
||||
listjojocomma: "{{ 'jojo is, a' | split(',') }}"
|
||||
|
||||
RETURN:
|
||||
|
||||
Reference in New Issue
Block a user