Skip to content

Commit 383c3cc

Browse files
committed
Removed unused code
- Legacy-Id: 2196
1 parent 9e4087f commit 383c3cc

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

ietf/idtracker/templatetags/ietf_filters.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,6 @@ def fill(text, width):
150150
wrapped.append(para)
151151
return "\n\n".join(wrapped)
152152

153-
@register.filter(name='allononelinew')
154-
def allononelinew(text):
155-
"""Map runs of whitespace to a single space and strip leading and trailing whitespace from the given string."""
156-
return re.sub("[\r\n\t ]+", " ", text).strip()
157-
158153
@register.filter(name='rfcspace')
159154
def rfcspace(string):
160155
"""
@@ -314,6 +309,10 @@ def linebreaks_lf(text):
314309

315310
@register.filter(name='clean_whitespace')
316311
def clean_whitespace(text):
312+
"""
313+
Map all ASCII control characters (0x00-0x1F) to spaces, and
314+
remove unnecessary spaces.
315+
"""
317316
text = re.sub("[\000-\040]+", " ", text)
318317
return text.strip()
319318

0 commit comments

Comments
 (0)