From f88e73b0387c65d6440a3ca2540e79d79c555b48 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Wed, 9 Nov 2022 17:24:39 +0900 Subject: Fix re.sub call --- src/fead.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/fead.py') diff --git a/src/fead.py b/src/fead.py index d1ad794..6efbe11 100755 --- a/src/fead.py +++ b/src/fead.py @@ -197,7 +197,7 @@ def select(n, ads): def truncate(ad, summary_length): """Return ad with truncated summary, whose HTML tags a stripped.""" - return ad._replace(summary=shorten(HTML_TAG.sub(ad.summary, ''), + return ad._replace(summary=shorten(HTML_TAG.sub('', ad.summary), summary_length, placeholder='…')) -- cgit 1.4.1