@@ -40,7 +40,7 @@ def mangle_docstrings(app, what, name, obj, options, lines,
4040
4141 if what == 'module' :
4242 # Strip top title
43- title_re = re .compile (ur '^\s*[#*=]{4,}\n[a-z0-9 -]+\n[#*=]{4,}\s*' ,
43+ title_re = re .compile (r '^\s*[#*=]{4,}\n[a-z0-9 -]+\n[#*=]{4,}\s*' ,
4444 re .I | re .S )
4545 lines [:] = title_re .sub (u'' , u"\n " .join (lines )).split (u"\n " )
4646 else :
@@ -61,7 +61,7 @@ def mangle_docstrings(app, what, name, obj, options, lines,
6161 references = []
6262 for line in lines :
6363 line = line .strip ()
64- m = re .match (ur '^.. \[([a-z0-9_.-])\]' , line , re .I )
64+ m = re .match (r '^.. \[([a-z0-9_.-])\]' , line , re .I )
6565 if m :
6666 references .append (m .group (1 ))
6767
@@ -70,7 +70,7 @@ def mangle_docstrings(app, what, name, obj, options, lines,
7070 if references :
7171 for i , line in enumerate (lines ):
7272 for r in references :
73- if re .match (ur '^\d+$' , r ):
73+ if re .match (r '^\d+$' , r ):
7474 new_r = u"R%d" % (reference_offset [0 ] + int (r ))
7575 else :
7676 new_r = u"%s%d" % (r , reference_offset [0 ])
0 commit comments