{% if handler.user.hasPerm(reply_post_perm) %}
{% endif %}
{% if (handler.user.hasPerm(comment_edit_self_perm) and doc.owner == handler.user._id) or handler.user.hasPerm(comment_edit_perm) %}
{% endif %}
{% if (handler.user.hasPerm(comment_delete_self_perm) and doc.owner == handler.user._id) or handler.user.hasPerm(comment_delete_perm) %}
{% endif %}
{{ doc['content']|markdown|safe }}
{% for rdoc in doc['reply'] %}
{{ reply(false, udict[rdoc.owner], doc, rdoc) }}
{% endfor %}