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 @@ -251,6 +251,11 @@ def _parse_param_list(self, content):
251
251
r"`(?P<name>(?:~\w+\.)?[a-zA-Z0-9_.-]+)`|"
252
252
r" (?P<name2>[a-zA-Z0-9_.-]+))\s*" , re .X )
253
253
254
+ if sys .version_info [0 ] >= 3 :
255
+ zerowidthspace = '\u200B '
256
+ else :
257
+ zerowidthspace = '\xE2 \x80 \x8B '
258
+
254
259
def _parse_see_also (self , content ):
255
260
"""
256
261
func_name : Descriptive text
@@ -484,7 +489,8 @@ def _str_see_also(self, func_role):
484
489
last_had_desc = True
485
490
else :
486
491
last_had_desc = False
487
- out += self ._str_indent (['\u200B ' ])
492
+ out += self ._str_indent ([self .zerowidthspace ])
493
+
488
494
if last_had_desc :
489
495
out += ['' ]
490
496
out += ['' ]
Original file line number Diff line number Diff line change @@ -332,7 +332,12 @@ def _strip_blank_lines(s):
332
332
333
333
334
334
def line_by_line_compare (a , b ):
335
- a = textwrap .dedent (a ).replace (u'\u200B ' , '' )
335
+ if sys .version_info .major >= 3 :
336
+ zerowidthspace = '\u200B '
337
+ else :
338
+ zerowidthspace = '\xE2 \x80 \x8B '
339
+
340
+ a = textwrap .dedent (a ).replace (zerowidthspace , '' )
336
341
b = textwrap .dedent (b )
337
342
a = [l .rstrip () for l in _strip_blank_lines (a ).split ('\n ' )]
338
343
b = [l .rstrip () for l in _strip_blank_lines (b ).split ('\n ' )]
You can’t perform that action at this time.
0 commit comments