Skip to content

Alternative delimiters or changing delimiters #227

@sebpiq

Description

@sebpiq

Hi !

I couldn't find if there is the possibility to change the delimiters for blocks or variables ({{}}, {{#, ...).
From a quick look in the source, the delimiters seem hard-coded in a regular expression, but I'd like to have the confirmation of that !?
Without giving complete freedom to chose the delimiters, it would be cool to be able to choose between alternative syntax.

My current problem is that I am using Django, and the delimiters of Django's templating langage and handlebar's clash. Therefore, where I need to use both template langages, I have to use very clumsy syntax like :

{% raw %}
    <img src="{{#if user.mugshot_url}}{{user.mugshot_url}}{{else}}{% endraw %}{{ USER_DEFAULT_PIC_URL }}{% raw %}{{/if}}"/>
{% endraw %}

Thanks !

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions