Sha256: f71173b8b55372f157a4228f393c3bfa25917dfaa75e8dfad10acee0a77db6e1

Contents?: true

Size: 587 Bytes

Versions: 22

Compression:

Stored size: 587 Bytes

Contents

<%
language ||= "html"
wrap ||= nil;
%>
<% code ||= capture do %><%= yield %><% end %>
<% output = highlight(code, language, {
  strip: defined?(strip) ? strip : true,
  line_numbers: line_numbers ||= false,
  highlight_lines: highlight_lines ||= [],
  start_line: start_line ||= 0
}) %>
<div class="code not-prose <%= "numbered" if line_numbers %> <%= classes ||= "" %> <%= "focussed" if highlight_lines.any? %>"
  x-data="code"
  :class="{'wrapped': wrap}"
  <% if wrap.present? %>x-effect="wrap = <%= wrap %>"<% end %>>
  <pre><code class="highlight"><%= output %></code></pre>
</div>

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
lookbook-0.9.8 app/views/lookbook/components/_code.html.erb
lookbook-0.9.7 app/views/lookbook/components/_code.html.erb
lookbook-0.9.6 app/views/lookbook/components/_code.html.erb
lookbook-0.9.5 app/views/lookbook/components/_code.html.erb
lookbook-0.9.4 app/views/lookbook/components/_code.html.erb
lookbook-0.9.3 app/views/lookbook/components/_code.html.erb
lookbook-0.9.2 app/views/lookbook/components/_code.html.erb
lookbook-0.9.1 app/views/lookbook/components/_code.html.erb
lookbook-0.9.0 app/views/lookbook/components/_code.html.erb
lookbook-0.8.3 app/views/lookbook/components/_code.html.erb
lookbook-0.8.2 app/views/lookbook/components/_code.html.erb
lookbook-0.8.1 app/views/lookbook/components/_code.html.erb
lookbook-0.8.0 app/views/lookbook/components/_code.html.erb
lookbook-0.8.0.beta.0 app/views/lookbook/components/_code.html.erb
lookbook-0.7.4 app/views/lookbook/components/_code.html.erb
lookbook-0.7.3 app/views/lookbook/components/_code.html.erb
lookbook-0.7.2 app/views/lookbook/components/_code.html.erb
lookbook-0.7.2.beta.5 app/views/lookbook/components/_code.html.erb
lookbook-0.7.2.beta.4 app/views/lookbook/components/_code.html.erb
lookbook-0.7.2.beta.3 app/views/lookbook/components/_code.html.erb