xoxys.general/plugins/filter/wrap.py

12 lines
210 B
Python
Raw Normal View History

2020-08-18 13:10:09 +00:00
"""Filter to wrap all items from a list."""
def wrap(value, wrapper="'"):
return [wrapper + x + wrapper for x in value]
class FilterModule(object):
def filters(self):
return {"wrap": wrap}