# HG changeset patch # User Teemu Piippo # Date 1561326864 -10800 # Node ID 55d52e25267fcab0b2e8edbf5bb3a8b0061ccf5e # Parent bd840d5dc8d8ea152e78042cb294f45ed5acee32 fixed prefixed punctuations winding up in the effective categories of subparts diff -r bd840d5dc8d8 -r 55d52e25267f header.py --- 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):