Fix bug where links to posts weren't being tracked

This commit is contained in:
Robin Ward
2013-02-13 15:22:04 -05:00
parent 941820ac88
commit dee9e9a51f
4 changed files with 58 additions and 1 deletions

View File

@ -216,6 +216,18 @@ module PrettyText
doc.css("a").each do |l|
links << l.attributes["href"].to_s
end
doc.css("aside.quote").each do |a|
topic_id = a.attributes['data-topic']
url = "/t/topic/#{topic_id}"
if post_number = a.attributes['data-post']
url << "/#{post_number}"
end
links << url
end
links
end