{% macro userlink(id, name) -%} {%- if id and name -%} {{ name or id }} {%- else -%} {{ name or 'Гость' }} {%- endif -%} {%- endmacro %} {% macro storylink(id, title) -%} {{ title }} {%- endmacro %} {% macro comment(comment) -%}
{{ comment.text_as_html|safe }}
{% if comment.author %} {{- userlink(comment.author.id, comment.author.username) -}} {% else %} {{- userlink(None, None) -}} {% endif %} {{ comment.date|datetimeformat('d MMMM Y, HH:mm') }} {{ caller() if caller else '' }}
{%- endmacro %}