This commit is contained in:
r888888888
2014-02-28 18:10:36 -08:00
parent b523ed471c
commit 0ef37c0538
3 changed files with 7 additions and 7 deletions

View File

@@ -4,14 +4,14 @@ module PostVersionsHelper
html = []
diff[:added_tags].each do |tag|
prefix = diff[:obsolete_added_tags].include?(tag) ? '+<ins class="obsolete">' : '<ins>+'
html << prefix + link_to(tag, posts_path(:tags => tag)) + '</ins>'
html << prefix + link_to(wordbreakify(tag), posts_path(:tags => tag)) + '</ins>'
end
diff[:removed_tags].each do |tag|
prefix = diff[:obsolete_removed_tags].include?(tag) ? '-<del class="obsolete">' : '<del>-'
html << prefix + link_to(tag, posts_path(:tags => tag)) + '</del>'
html << prefix + link_to(wordbreakify(tag), posts_path(:tags => tag)) + '</del>'
end
diff[:unchanged_tags].each do |tag|
html << '<span>' + link_to(tag, posts_path(:tags => tag)) + '</span>'
html << '<span>' + link_to(wordbreakify(tag), posts_path(:tags => tag)) + '</span>'
end
return html.join(" ").html_safe
end