こちらは余裕がなくてすぐにはできませんが参考になるのは添付ファイルが差分のとき
(拡張子が .patch か .diff のとき)差分を表示する
app/views/attachments/diff.html.erb
そこから render される
app/views/common/_diff.html.erb
です。
--- app/models/
wiki_page.rb.org+++ app/models/wiki_page.rb
@@ -207,7 +207,9 @@
def initialize(content_to, content_from)
@content_to = content_to
@content_from = content_from
- super(content_to.text, content_from.text)
+ super(
+ ApplicationController.helpers.textilizable(content_to, :text, :attachments => content_to.page.attachments),
+ ApplicationController.helpers.textilizable(content_from, :text, :attachments => content_from.page.attachments))
end
end
--- lib/redmine/helpers/
diff.rb.org+++ lib/redmine/helpers/diff.rb
@@ -62,7 +62,7 @@
words[add_to] = words[add_to] + '</span>'.html_safe
end
if del_at
- words.insert del_at - del_off + dels + words_add, '<span class="diff_out">'.html_safe + deleted + '</span>'.html_safe
+ words.insert del_at - del_off + dels + words_add, '<span class="diff_out">'.html_safe + deleted.html_safe + '</span>'.html_safe
dels += 1
del_off += words_del
words_del = 0