mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: allows to have custom emoji translation without static file (#9893)
This commit is contained in:
@ -126,6 +126,10 @@ module PrettyText
|
||||
@ctx
|
||||
end
|
||||
|
||||
def self.reset_translations
|
||||
v8.eval("__resetTranslationTree()")
|
||||
end
|
||||
|
||||
def self.reset_context
|
||||
@ctx_init.synchronize do
|
||||
@ctx&.dispose
|
||||
@ -159,6 +163,7 @@ module PrettyText
|
||||
__optInput.getTopicInfo = __getTopicInfo;
|
||||
__optInput.categoryHashtagLookup = __categoryLookup;
|
||||
__optInput.customEmoji = #{custom_emoji.to_json};
|
||||
__optInput.customEmojiTranslation = #{Plugin::CustomEmoji.translations.to_json};
|
||||
__optInput.emojiUnicodeReplacer = __emojiUnicodeReplacer;
|
||||
__optInput.lookupUploadUrls = __lookupUploadUrls;
|
||||
__optInput.censoredRegexp = #{WordWatcher.word_matcher_regexp(:censor)&.source.to_json};
|
||||
|
Reference in New Issue
Block a user