summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-11-29 09:30:52 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-11-29 09:30:52 +0200
commit28ed2788b32d5cad5aa09bec6eb6eac9e991d72d (patch)
tree5ecdaf694adad217ba997a838a5f1a1308962570
parenta1d2ce27ac2f42dd323c6e620f04d82b35663c92 (diff)
Feeds: Trim en/em dashes from entry titles
-rw-r--r--src/feeds.c4
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 }