diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/feeds.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/feeds.c b/src/feeds.c index 06aaed85..0f06e33d 100644 --- a/src/feeds.c +++ b/src/feeds.c | |||
@@ -164,13 +164,19 @@ static iFeedJob *startNextJob_Feeds_(iFeeds *d) { | |||
164 | return job; | 164 | return job; |
165 | } | 165 | } |
166 | 166 | ||
167 | static iBool isTrimmablePunctuation_(iChar c) { | ||
168 | if (c == '(' || c == '[' || c == '{' || c == '<') { | ||
169 | return iFalse; | ||
170 | } | ||
171 | /* Dashes or punctuation? */ | ||
172 | return c == 0x2013 || c == 0x2014 || (c < 128 && ispunct(c)); | ||
173 | } | ||
174 | |||
167 | static void trimTitle_(iString *title) { | 175 | static void trimTitle_(iString *title) { |
168 | const char *start = constBegin_String(title); | 176 | const char *start = constBegin_String(title); |
169 | iConstForEach(String, i, title) { | 177 | iConstForEach(String, i, title) { |
170 | start = i.pos; | 178 | start = i.pos; |
171 | if (!isSpace_Char(i.value) && | 179 | if (!isSpace_Char(i.value) && !isTrimmablePunctuation_(i.value)) { |
172 | /* Dashes or punctuation? */ | ||
173 | !(i.value == 0x2013 || i.value == 0x2014 || (i.value < 128 && ispunct(i.value)))) { | ||
174 | break; | 180 | break; |
175 | } | 181 | } |
176 | } | 182 | } |