aboutsummaryrefslogtreecommitdiff
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 641cc70..c85b85e 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(',;')