{% if links -%}
  {%- if heading -%}
    {%- if heading.level -%}
      <{{ heading.level }}{{ heading.attributes }}>{{ heading.text }}</{{ heading.level }}>
    {%- else -%}
      <h2{{ heading.attributes }}>{{ heading.text }}</h2>
    {%- endif -%}
  {%- endif -%}
  <ul{{ attributes }}>
    {%- for key, item in links -%}
        {%- if key != 'node-readmore' and key != 'comment-add'-%}
        <li{{ item.attributes }}>
            {%- if item.link -%}
              {{ item.link }}
            {%- elseif item.text_attributes -%}
              <span{{ item.text_attributes }}>{{ item.text }}</span>
            {%- else -%}
              {{ item.text }}
            {%- endif -%}
        </li>
        {%- endif -%}
    {%- endfor -%}
  </ul>
{%- endif %}
