From 28ed2788b32d5cad5aa09bec6eb6eac9e991d72d Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 29 Nov 2020 09:30:52 +0200 Subject: Feeds: Trim en/em dashes from entry titles --- src/feeds.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) { const char *start = constBegin_String(title); iConstForEach(String, i, title) { start = i.pos; - if (!isSpace_Char(i.value) && !(i.value < 128 && ispunct(i.value))) { + if (!isSpace_Char(i.value) && + /* Dashes or punctuation? */ + !(i.value == 0x2013 || i.value == 0x2014 || (i.value < 128 && ispunct(i.value)))) { break; } } -- cgit v1.2.3