Class: Banzai::Filter::AsciiDocPostProcessingFilter

Inherits:
HTML::Pipeline::Filter
  • Object
show all
Defined in:
lib/banzai/filter/ascii_doc_post_processing_filter.rb

Instance Method Summary collapse

Instance Method Details

#callObject


6
7
8
9
10
11
12
13
14
15
# File 'lib/banzai/filter/ascii_doc_post_processing_filter.rb', line 6

def call
  doc.search('[data-math-style]').each do |node|
    node.set_attribute('class', 'code math js-render-math')
  end

  doc.search('[data-mermaid-style]').each do |node|
    node.set_attribute('class', 'js-render-mermaid')
  end
  doc
end