app/views/lookbook/inspector/panels/_source.html.erb in lookbook-1.5.5 vs app/views/lookbook/inspector/panels/_source.html.erb in lookbook-2.0.0.beta.0

- old
+ new

@@ -1,11 +1,11 @@ <div class="h-full"> - <% if examples.many? %> - <%= lookbook_render :code, language: examples.first.source_lang[:name], line_numbers: true, full_height: true do -%> -<%- examples.each.with_index(1) do |example, i| -%> -<%== "#{sprintf example.source_lang[:comment], example.label}\n#{example.source}\n#{"\n" if i < examples.size}" %><% end %> + <% if scenarios.many? %> + <%= lookbook_render :code, language: scenarios.first.source_lang[:name], line_numbers: true, full_height: true do -%> +<%- scenarios.each.with_index(1) do |scenario, i| -%> +<%== "#{sprintf scenario.source_lang[:comment], scenario.label}\n#{scenario.source}\n#{"\n" if i < scenarios.size}" %><% end %> <% end %> <% else %> - <% example = examples.first %> - <%= lookbook_render :code, language: example.source_lang[:name], line_numbers: true, full_height: true do %><%== example.source %><% end %> + <% scenario = scenarios.first %> + <%= lookbook_render :code, language: scenario.source_lang[:name], line_numbers: true, full_height: true do %><%== scenario.source %><% end %> <% end %> </div> \ No newline at end of file