summaryrefslogtreecommitdiff
path: root/lib/banzai/filter/ascii_doc_post_processing_filter.rb
blob: 88439f06b5f6b18fa0a0ba240335c2154df21222 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module Banzai
  module Filter
    class AsciiDocPostProcessingFilter < HTML::Pipeline::Filter
      def call
        doc.search('[data-math-style]').each do |node|
          node.set_attribute('class', 'code math js-render-math')
        end

        doc
      end
    end
  end
end