Permalink
Browse files

Handle parsing of tweets with @replies properly

  • Loading branch information...
1 parent e7cdf66 commit 575aeed6f8bb115bb0477bb7711bd0b5794e945f Joshua Clayton committed Jun 28, 2009
Showing with 4 additions and 2 deletions.
  1. +2 −1 .gitignore
  2. +2 −1 app/models/feed_items/twitter.rb
View
@@ -1,3 +1,4 @@
+*.swp
*.svn
log/*
tmp/*
@@ -8,4 +9,4 @@ db/*.db
db/schema.rb
index/*
public/assets
-public/cache
+public/cache
@@ -5,6 +5,7 @@ def body
desc = self.description
parsed_text = if (users = self.description.scan(/\@[\w\_]+/)).any?
users.each {|user| desc = desc.gsub(user, "<a href='http://twitter.com/#{user.gsub(/\@/, '')}'>#{user}</a>") }
+ desc
else
desc
end
@@ -16,4 +17,4 @@ def body
item.description = nil if item.description =~ REPLY
item.valid?
end
-end
+end

0 comments on commit 575aeed

Please sign in to comment.