From 27c701b97a6aaf6414d40ec8f4b9329e3ed8ace9 Mon Sep 17 00:00:00 2001 From: rolux Date: Tue, 16 Dec 2014 18:11:14 +0000 Subject: [PATCH] when sorting names, handle trailing (...) and [...] --- ox/text.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ox/text.py b/ox/text.py index 8c75ce9..1c5ced4 100644 --- a/ox/text.py +++ b/ox/text.py @@ -255,6 +255,8 @@ def get_sort_name(name): last_names = [] if re.search('^[0-9]+$', first_names[-1]): add_name() + if re.search('[(\[].+?[)\]]$', first_names[-1]): + add_name() if find_name(SUFFIXES): add_name() add_name()