{% macro strip_p_tag(text) %}
  {%- set text_normalized = (text|string).strip() %}
  {%- if text_normalized.startswith("<p>") and text_normalized.endswith("</p>") %}
    {{- text_normalized[3:-4] }}
  {%- else %}
    {{- text }}
  {%- endif -%}
{% endmacro -%}

<li>
  <h2
    class="question"
    id="{{ strip_p_tag((this.question | string).replace("'", '').replace('?', '').replace(',', '').replace(' ', '-').lower()) }}"
  >{{ strip_p_tag(this.question) }}</h2>
  <div class="answer">{{ this.answer }}</div>
</li>
