You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: dollar_math_post_filter.rb
    path of file: ./repos/gitlabhq/lib/banzai/filter
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# Generated HTML is transformed back to GFM by:
# - app/assets/javascripts/behaviors/markdown/marks/math.js
# - app/assets/javascripts/behaviors/markdown/nodes/cod
    
      def process_dollar_pipeline
        doc.xpath('descendant-or-self::text()').each do |node|
          next if has_ancestor?(node, IGNORED_ANCESTOR_TAGS)

          node_html = node.to_html
          next unless DOLLAR_INLINE_UNTRUSTED_REGEX.match?(node_html) ||
            DOLLAR_DISPLAY_INLINE_UNTRUSTED_REGEX.match?(node_html)

          temp_doc = Nokogiri::HTML.fragment(node_html)

          DOLLAR_MATH_PIPELINE.each do |pipeline|
            temp_doc.xpath('child::text()').each do |temp_node|
              html = temp_node.to_html

              pipeline[:pattern].scan(temp_node.content).each do |match|
                math = pipeline[:pattern].extract_named_group(:math, match)
                html.sub!(match.first, math_html(math: math, style: pipeline[:style]))
              end

              temp_node.replace(html)
            end
          end

          node.replace(temp_doc)
        end
      end