Sha256: 9423bf725b6fd2eb331d76c3d3d46a1dc1c61a177c1c8568ebe7e713ee13fc68

Contents?: true

Size: 421 Bytes

Versions: 7

Compression:

Stored size: 421 Bytes

Contents

# frozen_string_literal: true

module Kitchen::Directions::BakePreface
  class V1
    def bake(book:)
      book.pages('$.preface').each do |page|
        page.titles.each do |title|
          title.replace_children(with:
            <<~HTML
              <span data-type="" itemprop="" class="os-text">#{title.text}</span>
            HTML
          )
          title.name = 'h1'
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
openstax_kitchen-5.0.0 lib/kitchen/directions/bake_preface/v1.rb
openstax_kitchen-4.1.1 lib/kitchen/directions/bake_preface/v1.rb
openstax_kitchen-4.1.0 lib/kitchen/directions/bake_preface/v1.rb
openstax_kitchen-4.0.0 lib/kitchen/directions/bake_preface/v1.rb
openstax_kitchen-3.2.0 lib/kitchen/directions/bake_preface/v1.rb
openstax_kitchen-3.1.0 lib/kitchen/directions/bake_preface/v1.rb
openstax_kitchen-3.0.0 lib/kitchen/directions/bake_preface/v1.rb