From 357e421fe87c21c9cb8252333d4bf5f5d1d26dfa Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Thu, 24 Jan 2013 03:31:14 -0500 Subject: [PATCH] Text nodes should now appear a bit better in tree form. --- mwparserfromhell/nodes/text.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mwparserfromhell/nodes/text.py b/mwparserfromhell/nodes/text.py index 06e5144..60ba847 100644 --- a/mwparserfromhell/nodes/text.py +++ b/mwparserfromhell/nodes/text.py @@ -39,6 +39,9 @@ class Text(Node): def __strip__(self, normalize, collapse): return self + def __showtree__(self, write, get, mark): + write(str(self).encode("unicode_escape").decode("utf8")) + @property def value(self): """The actual text itself."""