{% set lvl = level|default:2|integer %}{% if lvl < 1 or lvl > 6 %}{% set lvl = 2 %}{% endif %}{% set t = text|upper %}{% if lvl == 1 %}

# {{ t }}

{% elif lvl == 3 %}

### {{ t }}

{% elif lvl == 4 %}

#### {{ t }}

{% elif lvl == 5 %}
##### {{ t }}
{% elif lvl == 6 %}
###### {{ t }}
{% else %}

## {{ t }}

{% endif %}