summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--b4/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index c1f3a1f..37d8293 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -1382,6 +1382,8 @@ class LoreSubject:
# Find all [foo] in the title
while subject.find('[') == 0:
matches = re.search(r'^\[([^\]]*)\]', subject)
+ if not matches:
+ break
for chunk in matches.groups()[0].split():
# Remove any trailing commas or semicolons
chunk = chunk.strip(',;')