DEV: Remove unused variable

DEV: Remove unused variable.

From 7f7464e3e6ee7602888c29ba176f84e218b163bd Mon Sep 17 00:00:00 2001
From: Guo Xiang Tan <tgx_world@hotmail.com>
Date: Fri, 23 Nov 2018 08:31:52 +0800
Subject: [PATCH] DEV: Remove unused variable.


diff --git a/lib/pretty_text.rb b/lib/pretty_text.rb
index 6738710..22970f8 100644
--- a/lib/pretty_text.rb
+++ b/lib/pretty_text.rb
@@ -429,7 +429,7 @@ module PrettyText
 
   def self.add_mentions(doc, user_id: nil)
     elements = doc.css("span.mention")
-    names = elements.map { |element| name = element.text[1..-1] }
+    names = elements.map { |element| element.text[1..-1] }
 
     mentions = lookup_mentions(names, user_id: user_id)

GitHub

1 Like