mirror of
https://github.com/discourse/discourse-math.git
synced 2025-03-06 09:29:22 +00:00
This commit is also removing jquery code and simplifying code. Note that discourse-math is currently causing jumpy-ness in topics or in chat as the resulting processed mathjax element has a different size than the initial text node.
18 lines
498 B
Ruby
18 lines
498 B
Ruby
# frozen_string_literal: true
|
|
|
|
# name: discourse-math
|
|
# about: Official mathjax plugin for Discourse
|
|
# version: 0.9
|
|
# authors: Sam Saffron (sam)
|
|
# url: https://github.com/discourse/discourse-math
|
|
# transpile_js: true
|
|
|
|
register_asset "stylesheets/common/discourse-math.scss"
|
|
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
|
|
end
|