Class: Banzai::Filter::MathFilter
- Inherits:
-
HTML::Pipeline::Filter
- Object
- HTML::Pipeline::Filter
- Banzai::Filter::MathFilter
- Includes:
- Concerns::PipelineTimingCheck, Gitlab::Utils::StrongMemoize
- Defined in:
- lib/banzai/filter/math_filter.rb
Constant Summary collapse
- CSS_MATH_STYLE =
'pre[data-math-style], code[data-math-style], span[data-math-style]'- XPATH_MATH_STYLE =
Gitlab::Utils::Nokogiri.css_to_xpath(CSS_MATH_STYLE).freeze
- TAG_CLASS =
'js-render-math'- RENDER_NODES_LIMIT =
Limit to how many nodes can be marked as math elements. Prevents timeouts for large notes. For more information check: gitlab.com/gitlab-org/gitlab/-/issues/341832
50
Constants included from Concerns::PipelineTimingCheck
Concerns::PipelineTimingCheck::MAX_PIPELINE_SECONDS
Instance Method Summary collapse
Methods included from Concerns::PipelineTimingCheck
Instance Method Details
#call ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/banzai/filter/math_filter.rb', line 23 def call @nodes_count = 0 process_existing doc end |