Skip to content

Inline template processing with default processor #537

@xeruf

Description

@xeruf

Is your feature request related to a problem? Please describe.

Recently I stumbled upon the fact and lost quite some time debugging why this template file:

{% if env.DATA == "" %} 
  data: {{ env.HOME }}
{% else %}
  data: {{ env.DATA }}
{% endif %}

produces an error: else without matching if
Error: failed to process template

Don't see it? Neither did I - the issue is an extra space at the end of the line of the if clause!

Describe the solution you'd like

While solving this would be nice, I think this is only a stepping stone to a feature I thought was already there - inline template processing.
So that I could write something like this and not only substitute whole lines:

{% if env.DATA == "" %}{{ env.HOME }}{% else %}{{ env.DATA }}{% endif %}

Describe alternatives you've considered

currently I have to duplicate the lines if only a variable is different

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