Skip to content

Commit 79b825e

Browse files
committed
Drop unused import
1 parent a4e0f03 commit 79b825e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rest_framework/templatetags/rest_framework.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from __future__ import absolute_import, unicode_literals
22

3-
import decimal
43
import re
54

65
from django import template
@@ -133,6 +132,8 @@ def format_value(value):
133132
return mark_safe('<a href="{value}">{value}</a>'.format(value=escape(value)))
134133
elif '@' in value and not re.search(r'\s', value):
135134
return mark_safe('<a href="mailto:{value}">{value}</a>'.format(value=escape(value)))
135+
elif '\n' in value:
136+
return mark_safe('<pre>%s</pre>' % escape(value))
136137
return six.text_type(value)
137138

138139

0 commit comments

Comments
 (0)