From: Maurizio Paglia Date: Sat, 3 Dec 2022 16:47:07 +0000 (+0100) Subject: Remove whitespaces in hashtags X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=559e202becf4df9c4b997f7d8b191b9fe9670d76;p=blog.git Remove whitespaces in hashtags --- diff --git a/pelican_toot.py b/pelican_toot.py index f67f2260..562088ac 100644 --- a/pelican_toot.py +++ b/pelican_toot.py @@ -106,7 +106,7 @@ def post_updates(generator, writer): new_taglist = [] for i in taglist: new_taglist.append('#' + str(i)) - tags_to_publish = ', '.join(str(x) for x in new_taglist) + tags_to_publish = ', '.join(str(x).replace(" ", "") for x in new_taglist) mastodon_toot = title_to_publish + summary_to_publish + read_more + tags_to_publish else: mastodon_toot = title_to_publish + summary_to_publish + read_more