Skip to content

Commit

Permalink
Merge pull request #517 from whoosh-community/issue-491
Browse files Browse the repository at this point in the history
Fragment comparison use startchar & endchar, instead of PyObject id
  • Loading branch information
fortable1999 authored Dec 18, 2018
2 parents 0ce55dd + b983232 commit 416e3d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/whoosh/highlight.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def overlapped_length(self, fragment):
return max(ec, fec) - min(sc, fsc)

def __lt__(self, other):
return id(self) < id(other)
return self.startchar < other.startchar


# Tokenizing
Expand Down

0 comments on commit 416e3d9

Please sign in to comment.