chiark / gitweb /
Remove whitespaces in hashtags
authorMaurizio Paglia <mpaglia0@gmail.com>
Sat, 3 Dec 2022 16:47:07 +0000 (17:47 +0100)
committerGitHub <noreply@github.com>
Sat, 3 Dec 2022 16:47:07 +0000 (17:47 +0100)
pelican_toot.py

index f67f2260c2d7742ef9e4c1e80aff8e8d313b57d3..562088ac611885562dab204680570e9357479ef0 100644 (file)
@@ -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