File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -713,7 +713,7 @@ def markStartOfLinks(self, text):
713713 linkparts = []
714714 i = 0
715715
716- while balanced is not 0 or i is 0 : # pragma: no branch
716+ while balanced != 0 or i == 0 : # pragma: no branch
717717 # Starting at the end, pop off the previous part of the
718718 # slice's fragments.
719719
@@ -736,7 +736,7 @@ def markStartOfLinks(self, text):
736736 # HAL!"":url... In this case we count a zero length in
737737 # the last position as a closing quote and others as
738738 # opening quotes.
739- if i is 0 :
739+ if i == 0 :
740740 balanced = balanced + 1
741741 else :
742742 balanced = balanced - 1
@@ -751,7 +751,7 @@ def markStartOfLinks(self, text):
751751 break
752752 # If the next possibility is empty or ends in a space
753753 # we have a closing ".
754- if (possibility is '' or possibility .endswith (' ' )):
754+ if (possibility == '' or possibility .endswith (' ' )):
755755 # force search exit
756756 balanced = 0 ;
757757
@@ -1398,7 +1398,7 @@ def retrieveURLs(self, text):
13981398
13991399 def retrieveURL (self , match ):
14001400 url = self .refCache .get (int (match .group ('token' )), '' )
1401- if url is '' :
1401+ if url == '' :
14021402 return url
14031403
14041404 if url in self .urlrefs :
You can’t perform that action at this time.
0 commit comments