File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 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):
251251 r"`(?P<name>(?:~\w+\.)?[a-zA-Z0-9_.-]+)`|"
252252 r" (?P<name2>[a-zA-Z0-9_.-]+))\s*" , re .X )
253253
254+ if sys .version_info [0 ] >= 3 :
255+ zerowidthspace = '\u200B '
256+ else :
257+ zerowidthspace = '\xE2 \x80 \x8B '
258+
254259 def _parse_see_also (self , content ):
255260 """
256261 func_name : Descriptive text
@@ -484,7 +489,8 @@ def _str_see_also(self, func_role):
484489 last_had_desc = True
485490 else :
486491 last_had_desc = False
487- out += self ._str_indent (['\u200B ' ])
492+ out += self ._str_indent ([self .zerowidthspace ])
493+
488494 if last_had_desc :
489495 out += ['' ]
490496 out += ['' ]
Original file line number Diff line number Diff line change @@ -332,7 +332,12 @@ def _strip_blank_lines(s):
332332
333333
334334def 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 , '' )
336341 b = textwrap .dedent (b )
337342 a = [l .rstrip () for l in _strip_blank_lines (a ).split ('\n ' )]
338343 b = [l .rstrip () for l in _strip_blank_lines (b ).split ('\n ' )]
You can’t perform that action at this time.
0 commit comments