Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/banzai/filter/math_filter.rb')
-rw-r--r--lib/banzai/filter/math_filter.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/banzai/filter/math_filter.rb b/lib/banzai/filter/math_filter.rb
index 3161e030194..511da4b6ba5 100644
--- a/lib/banzai/filter/math_filter.rb
+++ b/lib/banzai/filter/math_filter.rb
@@ -93,10 +93,20 @@ module Banzai
end
def render_nodes_limit_reached?(count)
+ return false if wiki?
+ return false if blob?
return false unless settings.math_rendering_limits_enabled?
count >= RENDER_NODES_LIMIT
end
+
+ def wiki?
+ context[:wiki].present?
+ end
+
+ def blob?
+ context[:text_source] == :blob
+ end
end
end
end