artist versions: refactor diffs.

This commit is contained in:
evazion
2018-12-07 01:47:46 -06:00
parent 7bbe4e8ac1
commit e25e8d564a
6 changed files with 73 additions and 71 deletions

View File

@@ -1,6 +1,11 @@
require 'dtext'
module ApplicationHelper
def diff_list_html(new, old, latest)
diff = SetDiff.new(new, old, latest)
render "diff_list", diff: diff
end
def wordbreakify(string)
lines = string.scan(/.{1,10}/)
wordbreaked_string = lines.map{|str| h(str)}.join("<wbr>")