mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Used %r in the TextNode repr to show newlines better.
This commit is contained in:
committed by
Tim Graham
parent
c31bf8cb54
commit
3b81dbe844
@@ -976,8 +976,8 @@ class TextNode(Node):
|
||||
self.s = s
|
||||
|
||||
def __repr__(self):
|
||||
return force_str("<Text Node: '%s'>" % self.s[:25], 'ascii',
|
||||
errors='replace')
|
||||
rep = "<%s: %r>" % (self.__class__.__name__, self.s[:25])
|
||||
return force_str(rep, 'ascii', errors='replace')
|
||||
|
||||
def render(self, context):
|
||||
return self.s
|
||||
|
||||
Reference in New Issue
Block a user