header.py

changeset 84
55d52e25267f
parent 79
eb93feb6d3a3
child 97
7b24ff111cb6
--- a/header.py	Mon Jun 24 00:51:04 2019 +0300
+++ b/header.py	Mon Jun 24 00:54:24 2019 +0300
@@ -32,7 +32,11 @@
         if self.category:
             return self.category
         else:
-            return self.description.split(' ', 1)[0]
+            import string
+            category = self.description.split(' ', 1)[0]
+            while category and category[0] in string.punctuation:
+                category = category[1:]
+            return category
 
 class BadHeader:
     def __init__(self, index, reason):

mercurial