File tree 2 files changed +13
-2
lines changed
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -258,6 +258,11 @@ def _parse_param_list(self, content):
258
258
r"`(?P<name>(?:~\w+\.)?[a-zA-Z0-9_.-]+)`|"
259
259
r" (?P<name2>[a-zA-Z0-9_.-]+))\s*" , re .X )
260
260
261
+ if sys .version_info [0 ] >= 3 :
262
+ zerowidthspace = '\u200B '
263
+ else :
264
+ zerowidthspace = '\xE2 \x80 \x8B '
265
+
261
266
def _parse_see_also (self , content ):
262
267
"""
263
268
func_name : Descriptive text
@@ -492,7 +497,8 @@ def _str_see_also(self, func_role):
492
497
last_had_desc = True
493
498
else :
494
499
last_had_desc = False
495
- out += self ._str_indent (['\u200B ' ])
500
+ out += self ._str_indent ([self .zerowidthspace ])
501
+
496
502
if last_had_desc :
497
503
out += ['' ]
498
504
out += ['' ]
Original file line number Diff line number Diff line change @@ -331,7 +331,12 @@ def _strip_blank_lines(s):
331
331
332
332
333
333
def line_by_line_compare (a , b ):
334
- a = textwrap .dedent (a ).replace (u'\u200B ' , '' )
334
+ if sys .version_info .major >= 3 :
335
+ zerowidthspace = '\u200B '
336
+ else :
337
+ zerowidthspace = '\xE2 \x80 \x8B '
338
+
339
+ a = textwrap .dedent (a ).replace (zerowidthspace , '' )
335
340
b = textwrap .dedent (b )
336
341
a = [l .rstrip () for l in _strip_blank_lines (a ).split ('\n ' )]
337
342
b = [l .rstrip () for l in _strip_blank_lines (b ).split ('\n ' )]
You can’t perform that action at this time.
0 commit comments