Skip to content

Commit 3a48346

Browse files
committed
Add simple split filter, as the opposite of the built-in join filter
- Legacy-Id: 6710
1 parent e6b0ef4 commit 3a48346

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ietf/doc/templatetags/ietf_filters.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,10 @@ def truncate_ellipsis(text, arg):
277277
else:
278278
return escape(text)
279279

280+
@register.filter
281+
def split(text, splitter=None):
282+
return text.split(splitter)
283+
280284
@register.filter(name="wrap_long_lines")
281285
def wrap_long_lines(text):
282286
"""Wraps long lines without loosing the formatting and indentation

0 commit comments

Comments
 (0)