{% match username -%} {%- when Some with (username) -%} ({{ username|safe }}) {%- when None -%} ({{ name }}) {%- endmatch %}