From 5d33dee8178cbd9f59994cf67bdfe16695e0788a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Tue, 23 Dec 2014 02:22:10 +0100 Subject: [PATCH] FIX: custom emoji weren't properly baking --- lib/pretty_text.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/pretty_text.rb b/lib/pretty_text.rb index 81846f75e7a..f937ae80fef 100644 --- a/lib/pretty_text.rb +++ b/lib/pretty_text.rb @@ -94,6 +94,14 @@ module PrettyText end end + # custom emojis + emoji = ERB.new(File.read("app/assets/javascripts/discourse/lib/emoji/emoji.js.erb")) + ctx.eval(emoji.result) + + Emoji.custom.each do |emoji| + ctx.eval("Discourse.Dialect.registerEmoji('#{emoji.name}', '#{emoji.url}');") + end + ctx['quoteTemplate'] = File.open(app_root + 'app/assets/javascripts/discourse/templates/quote.hbs') {|f| f.read} ctx['quoteEmailTemplate'] = File.open(app_root + 'lib/assets/quote_email.hbs') {|f| f.read} ctx.eval("HANDLEBARS_TEMPLATES = {