module Kitchen::Directions::BakeInlineLists
Bakes inline lists with the desired list separator Does not separate the last list item
Constants
- LIST_SEPARATOR
- SEPARATOR_CLASS
Public Class Methods
v1(book:)
click to toggle source
# File lib/kitchen/directions/bake_inline_lists.rb, line 12 def self.v1(book:) inline_lists = book.search('span[data-display="inline"][data-list-type="labeled-item"]') inline_lists.each do |list| list.search('span[data-type="item"]')[0..-2].each do |item| item.append(child: "<span class=\"#{SEPARATOR_CLASS}\">#{LIST_SEPARATOR}</span>") end end end