Using regex in the sidebar gives different result
from previous gramps release. Fixes #11321
This commit is contained in:
parent
3d1ef5e595
commit
cc28935b15
@ -183,13 +183,18 @@ class PersonSidebarFilter(SidebarFilter):
|
||||
# build a GenericFilter
|
||||
generic_filter = GenericFilter()
|
||||
|
||||
# if the name is not empty, choose either the regular expression
|
||||
# version or the normal text match
|
||||
# if the name is not empty, split the name in multiple part if
|
||||
# we don't use regexp. if the regexp is used, don't split the
|
||||
# field
|
||||
if name:
|
||||
if not regex:
|
||||
name_parts = name.split(sep=" ")
|
||||
for name_part in name_parts:
|
||||
rule = RegExpName([name_part], use_regex=regex)
|
||||
generic_filter.add_rule(rule)
|
||||
else:
|
||||
rule = RegExpName([name], use_regex=regex)
|
||||
generic_filter.add_rule(rule)
|
||||
|
||||
# if the id is not empty, choose either the regular expression
|
||||
# version or the normal text match
|
||||
|
Loading…
Reference in New Issue
Block a user