lib/slim_lint/sexp.rb in slim_lint-0.15.1 vs lib/slim_lint/sexp.rb in slim_lint-0.16.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + module SlimLint # Symbolic expression which represents tree-structured data. # # The main use of this particular implementation is to provide a single # location for defining convenience helpers when operating on Sexps. @@ -76,10 +78,10 @@ # # @param depth [Integer] indentation level to display Sexp at # @return [String] def display(depth = 1) # rubocop:disable Metrics/AbcSize indentation = ' ' * 2 * depth - output = '[' + output = '['.dup each_with_index do |nested_sexp, index| output << "\n" output += indentation