Sha256: 6b8fac5348dd4301d4292f3f15d2fac149382736b84be959da935d30df231884
Contents?: true
Size: 656 Bytes
Versions: 17
Compression:
Stored size: 656 Bytes
Contents
# frozen_string_literal: true module Kitchen module Directions # Bakes inline lists with the desired list separator # Does not separate the last list item # module BakeInlineLists LIST_SEPARATOR = '; ' SEPARATOR_CLASS = '-os-inline-list-separator' 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 end end end
Version data entries
17 entries across 17 versions & 1 rubygems