changeset 15121:0ad0ebe67815

minirst: remove pointless transcoding
author Matt Mackall <mpm@selenic.com>
date Sat, 17 Sep 2011 13:37:49 -0500
parents 8e848435673c
children efa213b14ec0
files mercurial/minirst.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/minirst.py	Sat Sep 17 13:37:47 2011 -0500
+++ b/mercurial/minirst.py	Sat Sep 17 13:37:49 2011 -0500
@@ -24,11 +24,9 @@
 
 
 def replace(text, substs):
-    utext = text.decode(encoding.encoding)
     for f, t in substs:
-        utext = utext.replace(f, t)
-    return utext.encode(encoding.encoding)
-
+        text = text.replace(f, t)
+    return text
 
 _blockre = re.compile(r"\n(?:\s*\n)+")