Sha256: 2a1d46e0a129c8343070a975d04b6e1ef186ffe7756f5f861c53eb1a000c383b

Contents?: true

Size: 599 Bytes

Versions: 18

Compression:

Stored size: 599 Bytes

Contents

# frozen_string_literal: true

module Kitchen
  module Directions
    module BakeStepwise
      def self.v1(book:)
        book.search('ol.stepwise').each do |ol|
          ol.remove_class('stepwise')
          ol.add_class('os-stepwise')

          ol.search('li').each_with_index do |li, ii|
            li.wrap_children('span', class: 'os-stepwise-content')
            li.prepend(child:
              <<~HTML
                <span class="os-stepwise-token">#{I18n.t(:stepwise_step_label)} #{ii + 1}. </span>
              HTML
            )
          end
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
openstax_kitchen-11.2.0 lib/kitchen/directions/bake_stepwise.rb
openstax_kitchen-11.1.0 lib/kitchen/directions/bake_stepwise.rb
openstax_kitchen-11.0.0 lib/kitchen/directions/bake_stepwise.rb
openstax_kitchen-10.0.0 lib/kitchen/directions/bake_stepwise.rb
openstax_kitchen-9.2.0 lib/kitchen/directions/bake_stepwise.rb
openstax_kitchen-9.1.0 lib/kitchen/directions/bake_stepwise.rb
openstax_kitchen-9.0.0 lib/kitchen/directions/bake_stepwise.rb
openstax_kitchen-8.0.1 lib/kitchen/directions/bake_stepwise.rb
openstax_kitchen-8.0.0 lib/kitchen/directions/bake_stepwise.rb
openstax_kitchen-7.0.0 lib/kitchen/directions/bake_stepwise.rb
openstax_kitchen-6.1.0 lib/kitchen/directions/bake_stepwise.rb
openstax_kitchen-6.0.0 lib/kitchen/directions/bake_stepwise.rb
openstax_kitchen-5.0.0 lib/kitchen/directions/bake_stepwise.rb
openstax_kitchen-4.1.1 lib/kitchen/directions/bake_stepwise.rb
openstax_kitchen-4.1.0 lib/kitchen/directions/bake_stepwise.rb
openstax_kitchen-4.0.0 lib/kitchen/directions/bake_stepwise.rb
openstax_kitchen-3.2.0 lib/kitchen/directions/bake_stepwise.rb
openstax_kitchen-3.1.0 lib/kitchen/directions/bake_stepwise.rb