comparison doc/hgmanpage.py @ 30057:a8ba9a23c893

hgmanpage: stop using raw-unicode strings These don't exist in Python 3, and this ends up looking a little more explicit to Martijn and me anyway.
author Augie Fackler <augie@google.com>
date Fri, 07 Oct 2016 07:43:04 -0400
parents a181dbef8e7f
children eb14ab7db33e
comparison
equal deleted inserted replaced
30056:3eb4df6d15f8 30057:a8ba9a23c893
286 286
287 def visit_Text(self, node): 287 def visit_Text(self, node):
288 text = node.astext() 288 text = node.astext()
289 text = text.replace('\\','\\e') 289 text = text.replace('\\','\\e')
290 replace_pairs = [ 290 replace_pairs = [
291 (u'-', ur'\-'), 291 (u'-', u'\\-'),
292 (u'\'', ur'\(aq'), 292 (u"'", u'\\(aq'),
293 (u'´', ur'\''), 293 (u'´', u"\\'"),
294 (u'`', ur'\(ga'), 294 (u'`', u'\\(ga'),
295 ] 295 ]
296 for (in_char, out_markup) in replace_pairs: 296 for (in_char, out_markup) in replace_pairs:
297 text = text.replace(in_char, out_markup) 297 text = text.replace(in_char, out_markup)
298 # unicode 298 # unicode
299 text = self.deunicode(text) 299 text = self.deunicode(text)