Skip to content

Commit

Permalink
Workaround for strange issue with order of auto_link and gsub for twe…
Browse files Browse the repository at this point in the history
…ets.
  • Loading branch information
Matt Tarbit committed Dec 13, 2011
1 parent 3d4c90b commit b6a846e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/partials/variants/status/_multiple.html.erb
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,6 @@
<%# entry.content = auto_link(entry.content, :urls) %>
<% entry.content.gsub!(/(\s|^)@(\w+)(?=\s|$)/) {|s| $1 + link_to("@#{$2}", "http://twitter.com/#{$2}") } %> <% entry.content.gsub!(/(\s|^)@(\w+)(?=\s|$)/) {|s| $1 + link_to("@#{$2}", "http://twitter.com/#{$2}") } %>
<% entry.content.gsub!(/(\s|^)(#\w+)(?=\s|$)/) {|s| $1 + link_to($2, "http://twitter.com/search?q=" + URI.escape($2)) } %> <% entry.content.gsub!(/(\s|^)(#\w+)(?=\s|$)/) {|s| $1 + link_to($2, "http://twitter.com/search?q=" + URI.escape($2)) } %>
<% entry.content = auto_link(entry.content, :urls) %>
<% string_format = '<span class="lquote">&#8220;</span>%s<span class="rquote">&#8221;</span><span class="source">&mdash; %s</span>' %> <% string_format = '<span class="lquote">&#8220;</span>%s<span class="rquote">&#8221;</span><span class="source">&mdash; %s</span>' %>
<div class="quote"> <div class="quote">
<div class="content"><%= highlight_html(markdown(string_format % [entry.content, link_to("@twitter", entry.status_url)]), @words) %></div> <div class="content"><%= highlight_html(markdown(string_format % [entry.content, link_to("@twitter", entry.status_url)]), @words) %></div>
Expand Down

0 comments on commit b6a846e

Please sign in to comment.