{%- set original_expression = expression -%}
{%- if original_expression is iterable and original_expression is not string -%}
  {%- for expression in original_expression -%}
    {%- include "expression.html" with context -%}
  {%- endfor -%}
{%- elif original_expression is string -%}
  {{ original_expression }}
{%- else -%}
  {%- with annotation = original_expression|attr(config.annotations_path) -%}
    <span data-autorefs-optional{% if annotation != original_expression.full %}-hover{% endif %}="{{ original_expression.full }}">{{ annotation }}</span>
  {%- endwith -%}
{%- endif -%}
