##// END OF EJS Templates
minirst: explicitly decode substitutions...
Matt Mackall -
r21745:4c62478b default
parent child Browse files
Show More
@@ -56,7 +56,7 b' def replace(text, substs):'
56 # on strings in local encoding causes invalid byte sequences.
56 # on strings in local encoding causes invalid byte sequences.
57 utext = text.decode(encoding.encoding)
57 utext = text.decode(encoding.encoding)
58 for f, t in substs:
58 for f, t in substs:
59 utext = utext.replace(f, t)
59 utext = utext.replace(f.decode("ascii"), t.decode("ascii"))
60 return utext.encode(encoding.encoding)
60 return utext.encode(encoding.encoding)
61
61
62 _blockre = re.compile(r"\n(?:\s*\n)+")
62 _blockre = re.compile(r"\n(?:\s*\n)+")
General Comments 0
You need to be logged in to leave comments. Login now