@@ -40,7 +40,7 @@ def mangle_docstrings(app, what, name, obj, options, lines,
40
40
41
41
if what == 'module' :
42
42
# 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*' ,
44
44
re .I | re .S )
45
45
lines [:] = title_re .sub (u'' , u"\n " .join (lines )).split (u"\n " )
46
46
else :
@@ -61,7 +61,7 @@ def mangle_docstrings(app, what, name, obj, options, lines,
61
61
references = []
62
62
for line in lines :
63
63
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 )
65
65
if m :
66
66
references .append (m .group (1 ))
67
67
@@ -70,7 +70,7 @@ def mangle_docstrings(app, what, name, obj, options, lines,
70
70
if references :
71
71
for i , line in enumerate (lines ):
72
72
for r in references :
73
- if re .match (ur '^\d+$' , r ):
73
+ if re .match (r '^\d+$' , r ):
74
74
new_r = u"R%d" % (reference_offset [0 ] + int (r ))
75
75
else :
76
76
new_r = u"%s%d" % (r , reference_offset [0 ])
0 commit comments