Skip to content

Commit

Permalink
Merge pull request #3143 from evazion/fix-post-versions-wordbreaks
Browse files Browse the repository at this point in the history
Fix wordbreaks in tags on /post_versions
  • Loading branch information
r888888888 committed Jun 12, 2017
2 parents 73d9b8b + 1f28409 commit 24154af
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/helpers/post_versions_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ def post_version_diff(post_version)
diff[:added_tags].each do |tag|
prefix = diff[:obsolete_added_tags].include?(tag) ? '+<ins class="obsolete">' : '<ins>+'
html << prefix + link_to(wordbreakify(tag), posts_path(:tags => tag)) + '</ins>'
html << " "
end
diff[:removed_tags].each do |tag|
prefix = diff[:obsolete_removed_tags].include?(tag) ? '-<del class="obsolete">' : '<del>-'
html << prefix + link_to(wordbreakify(tag), posts_path(:tags => tag)) + '</del>'
html << " "
end
diff[:unchanged_tags].each do |tag|
html << '<span>' + link_to(wordbreakify(tag), posts_path(:tags => tag)) + '</span>'
Expand Down

0 comments on commit 24154af

Please sign in to comment.