From 529ad1fe6da924da378a60bec48c35657bb01a68 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Mon, 14 Aug 2023 23:24:13 +0200 Subject: [PATCH] FIX: correctly enables features of discourse-math (#73) Prior to this fix discourse-math would not correctly be cooked in chat messages. --- plugin.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin.rb b/plugin.rb index 0ed7a86..f2ff730 100644 --- a/plugin.rb +++ b/plugin.rb @@ -13,5 +13,9 @@ register_asset "stylesheets/ext/discourse-chat.scss" enabled_site_setting :discourse_math_enabled after_initialize do - chat&.enable_markdown_feature("discourse-math") if respond_to?(:chat) && SiteSetting.chat_enabled + if respond_to?(:chat) && SiteSetting.chat_enabled + chat&.enable_markdown_feature("discourse-math") + chat&.enable_markdown_feature("math") + chat&.enable_markdown_feature("asciimath") if SiteSetting.discourse_math_enable_asciimath + end end