{% from 'macros.jinja2' import base_type -%}

<div class="mkapi-docstring">
{% for section in docstring.sections -%}
  {% set section_name = section.name|lower|replace(' ', '-') -%}
  {% if section.html -%}
    <div class="mkapi-section{% if section.name %} {{ section_name }}{% endif %}">
      {% if section.name -%}
        <div class="mkapi-section-name {{ section_name }}">
          <span class="mkapi-section-name-body {{ section_name }}">{{ section.name }}</span> {{ base_type(section) }}
        </div>
      {% endif -%}
      <div class="mkapi-section-body{% if section.name %} {{ section_name }}{% endif %}">{{ section.html|safe }}</div>
    </div>
  {% endif -%}
{% endfor -%}
</div>
