Skip to content
Browse files

Small refactoring

  • Loading branch information...
1 parent fbb87a3 commit e2de59bb6c10f357899cf62052ec712c1e947b04 @keitaf keitaf committed Mar 30, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/autolink.rb
View
5 lib/autolink.rb
@@ -38,11 +38,10 @@ def auto_link_with_json(text, json, options = {})
entities = json.values().flatten()
# map JSON entity to twitter-text entity
- entities.map! do |entity|
- entity = entity.symbolize_keys
+ entities.each do |entity|
+ entity.symbolize_keys!
# hashtag
entity[:hashtag] = entity[:text] if entity[:text]
- entity
end
auto_link_entities(text, entities, options)

0 comments on commit e2de59b

Please sign in to comment.
Something went wrong with that request. Please try again.