Sha256: bd53a8bc86a6078610d5c10ba3e1f02aa209ccf6bb6e5093290ed2c7b201d60d
Contents?: true
Size: 724 Bytes
Versions: 42
Compression:
Stored size: 724 Bytes
Contents
match("**") do |elements| have_preformatted_in_parent = Proc.new do |element| if element.nil? false elsif element.is_a?(PreformattedBlock) true else have_preformatted_in_parent.call(element.parent) end end have_preformatted_in_children = Proc.new do |element| if element.nil? false elsif element.is_a?(PreformattedBlock) true elsif element.respond_to?(:elements) element.elements.any? {|child| have_preformatted_in_children.call(child)} else false end end elements.each do |element| next if have_preformatted_in_parent.call(element) next if have_preformatted_in_children.call(element) element.substitute_newline end end
Version data entries
42 entries across 42 versions & 1 rubygems