Sha256: a90861fd1d743e7bf8bc5db30160516e30416ca5ab8a50d614611d43333f4ada

Contents?: true

Size: 378 Bytes

Versions: 30

Compression:

Stored size: 378 Bytes

Contents

# frozen-string-literal: true

module Kitchen
  module Directions
    # Wraps any math contained in a <p> tag
    # with a <span> with class 'os-math-in-para'
    module BakeMathInParagraph
      def self.v1(book:)
        book.search('p m|math', '//p//math | //p//m').each do |math|
          math.wrap("<span class='os-math-in-para'>")
        end
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
openstax_kitchen-19.0.0 lib/kitchen/directions/bake_math_in_paragraph.rb
openstax_kitchen-18.0.0 lib/kitchen/directions/bake_math_in_paragraph.rb
openstax_kitchen-17.1.0 lib/kitchen/directions/bake_math_in_paragraph.rb
openstax_kitchen-17.0.0 lib/kitchen/directions/bake_math_in_paragraph.rb
openstax_kitchen-16.0.0 lib/kitchen/directions/bake_math_in_paragraph.rb
openstax_kitchen-15.0.0 lib/kitchen/directions/bake_math_in_paragraph.rb
openstax_kitchen-14.0.0 lib/kitchen/directions/bake_math_in_paragraph.rb
openstax_kitchen-13.0.0 lib/kitchen/directions/bake_math_in_paragraph.rb
openstax_kitchen-12.2.0 lib/kitchen/directions/bake_math_in_paragraph.rb
openstax_kitchen-12.1.0 lib/kitchen/directions/bake_math_in_paragraph.rb
openstax_kitchen-12.0.0 lib/kitchen/directions/bake_math_in_paragraph.rb
openstax_kitchen-11.2.0 lib/kitchen/directions/bake_math_in_paragraph.rb
openstax_kitchen-11.1.0 lib/kitchen/directions/bake_math_in_paragraph.rb
openstax_kitchen-11.0.0 lib/kitchen/directions/bake_math_in_paragraph.rb
openstax_kitchen-10.0.0 lib/kitchen/directions/bake_math_in_paragraph.rb
openstax_kitchen-9.2.0 lib/kitchen/directions/bake_math_in_paragraph.rb
openstax_kitchen-9.1.0 lib/kitchen/directions/bake_math_in_paragraph.rb
openstax_kitchen-9.0.0 lib/kitchen/directions/bake_math_in_paragraph.rb
openstax_kitchen-8.0.1 lib/kitchen/directions/bake_math_in_paragraph.rb
openstax_kitchen-8.0.0 lib/kitchen/directions/bake_math_in_paragraph.rb