ekardnam 4 anos atrás
pai
commit
da0703b34c
1 arquivos alterados com 1 adições e 4 exclusões
  1. 1 4
      bot.js

+ 1 - 4
bot.js

@@ -129,10 +129,7 @@ let bot = {
   // makes a post formatted for twitter
   // mastodon returns posts in HTML
   twitterFormat: function(post) {
-    post = post.replace('<br/>', '\n') // new lines
-    post = post.replace('<p>', '')
-    post = post.replace('</p>', '\n')
-    return post
+    return post.replace(/<[^>]*>?/gm, '')
   },
 
   // poll on mastodon status updates