diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-29 09:30:52 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-29 09:30:52 +0200 |
commit | 28ed2788b32d5cad5aa09bec6eb6eac9e991d72d (patch) | |
tree | 5ecdaf694adad217ba997a838a5f1a1308962570 | |
parent | a1d2ce27ac2f42dd323c6e620f04d82b35663c92 (diff) |
Feeds: Trim en/em dashes from entry titles
-rw-r--r-- | src/feeds.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/feeds.c b/src/feeds.c index d8a2f24d..2b8bd73e 100644 --- a/src/feeds.c +++ b/src/feeds.c | |||
@@ -134,7 +134,9 @@ static void trimTitle_(iString *title) { | |||
134 | const char *start = constBegin_String(title); | 134 | const char *start = constBegin_String(title); |
135 | iConstForEach(String, i, title) { | 135 | iConstForEach(String, i, title) { |
136 | start = i.pos; | 136 | start = i.pos; |
137 | if (!isSpace_Char(i.value) && !(i.value < 128 && ispunct(i.value))) { | 137 | if (!isSpace_Char(i.value) && |
138 | /* Dashes or punctuation? */ | ||
139 | !(i.value == 0x2013 || i.value == 0x2014 || (i.value < 128 && ispunct(i.value)))) { | ||
138 | break; | 140 | break; |
139 | } | 141 | } |
140 | } | 142 | } |