# HG changeset patch # User Paul Boddie # Date 1292540773 -3600 # Node ID 9867931a9269dccfa1a131cd00ea15395eb8189d # Parent ea2944f51430299339fd9e4490773d1b447668ab Avoid identical adjacent tokens being matched to the same document token. diff -r ea2944f51430 -r 9867931a9269 iixr/phrases.py --- a/iixr/phrases.py Fri Nov 26 01:07:30 2010 +0100 +++ b/iixr/phrases.py Fri Dec 17 00:06:13 2010 +0100 @@ -4,7 +4,7 @@ Phrase iterators providing navigation over common positions for a number of different terms. -Copyright (C) 2009 Paul Boddie +Copyright (C) 2009, 2010 Paul Boddie This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -176,8 +176,8 @@ # NOTE: index/position. if isinstance(last, (list, tuple)): - return current[0] - last[0] <= 1 + return current[0] - last[0] == 1 else: - return current - last <= 1 + return current - last == 1 # vim: tabstop=4 expandtab shiftwidth=4