<%
  if !local_assigns[:heading_level]
    heading_level = :h2
  elsif local_assigns[:heading_level].zero?
    heading_level = false
  else
    heading_level = ([*1..6].include?(local_assigns[:heading_level]) ? "h#{local_assigns[:heading_level]}" : "h2").to_sym
  end

  items ||= []
%>
<% if items.any? %>
  <ol class="govuk-list app-c-taxon-list">
    <% items.each do |item| %>
      <li class="app-c-taxon-list__item">
        <% if item[:description] && heading_level %>
          <%= content_tag(heading_level, {
            class: "govuk-heading-s app-c-taxon-list__heading",
          }) do %>
            <%= link_to(item[:text], item[:path], {
              data: item[:data_attributes],
              class: "app-c-taxon-list__link govuk-link"
            }) %>
          <% end %>
        <% else %>
          <%= link_to(item[:text], item[:path], {
            data: item[:data_attributes],
            class: "app-c-taxon-list__link govuk-link",
          }) %>
        <% end %>

        <% if item[:description] %>
          <p class="app-c-taxon-list__description govuk-body">
            <%= item[:description] %>
          </p>
        <% end %>
      </li>
    <% end %>
  </ol>
<% end %>

<%
  if !local_assigns[:heading_level]
    heading_level = :h2
  elsif local_assigns[:heading_level].zero?
    heading_level = false
  else
    heading_level = ([*1..6].include?(local_assigns[:heading_level]) ? "h#{local_assigns[:heading_level]}" : "h2").to_sym
  end

  items ||= []
%>
<% if items.any? %>
  <ol class="govuk-list govuk-list--spaced app-c-taxon-list">
    <% items.each do |item| %>
      <li class="app-c-taxon-list__item">
        <% if item[:description] && heading_level %>
          <%= content_tag(heading_level, {
            class: "govuk-heading-s app-c-taxon-list__heading",
          }) do %>
            <%= link_to(item[:text], item[:path], {
              data: item[:data_attributes],
              class: "app-c-taxon-list__link govuk-link"
            }) %>
          <% end %>
        <% else %>
          <%= link_to(item[:text], item[:path], {
            data: item[:data_attributes],
            class: "app-c-taxon-list__link govuk-link",
          }) %>
        <% end %>

        <% if item[:description] %>
          <p class="app-c-taxon-list__description govuk-body">
            <%= item[:description] %>
          </p>
        <% end %>
      </li>
    <% end %>
  </ol>
<% end %>

Add spacing to taxon list
Add spacing to taxon list
