Open rayniel95 opened 2 years ago
I do not sure if this is a bug or a feature (according to https://github.com/purcell/airspeed/issues/47#issuecomment-638552958). But if I execute:
import airspeed t = airspeed.Template(""" #set($some=" some ") $some.trim() $some.strip() """) people = [{'name': 'Bill', 'age': 100}, {'name': 'Bob', 'age': 90}, {'name': 'Mark', 'age': 25}] print(t.merge(locals()))
the output is:
$some.trim() some
so, for some reason the trim method used to remove white spaces in Java need to be changed to its Python equivalent.
There are some extra string methods already, see here — if you'd like to submit a PR with a couple of little tests, I'd be happy to incorporate it.
I do not sure if this is a bug or a feature (according to https://github.com/purcell/airspeed/issues/47#issuecomment-638552958). But if I execute:
the output is:
so, for some reason the trim method used to remove white spaces in Java need to be changed to its Python equivalent.