mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: improves discourse-local-dates rendering in emails
This commit is contained in:
@ -11,4 +11,12 @@ register_asset "moment-timezone.js", :vendored_core_pretty_text
|
||||
|
||||
enabled_site_setting :discourse_local_dates_enabled
|
||||
|
||||
after_initialize do
|
||||
on(:reduce_cooked) do |fragment|
|
||||
container = fragment.children[0].children[0]
|
||||
preview = container.attributes["data-email-preview"].value
|
||||
container.content = preview
|
||||
end
|
||||
end
|
||||
|
||||
load File.expand_path('../lib/discourse_local_dates/engine.rb', __FILE__)
|
||||
|
Reference in New Issue
Block a user