app/views/lookbook/components/_code.html.erb in lookbook-0.5.0.beta.0 vs app/views/lookbook/components/_code.html.erb in lookbook-0.5.0.beta.1

- old
+ new

@@ -1,8 +1,13 @@ <% line_numbers ||= false language ||= "html" +wrap ||= nil; %> <% code = capture do %><%= yield %><% end %> -<div class="code <%= "numbered" if line_numbers %> <%= classes %>"> +<div class="code <%= "numbered" if line_numbers %> <%= classes %>" + x-data="code" + :class="{'wrapped': wrap}" + <% if wrap.present? %>x-effect="wrap = <%= wrap %>"<% end %> +> <pre><code class="highlight"><%= highlight(code.strip, language, line_numbers: line_numbers) %></code></pre> </div> \ No newline at end of file