gruntjs / gruntjs/grunt-init

Ignore {% %} patterns

Open
#80 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
195
Forks
57
PR merge metrics
No merged PRs in 30d

Description

Hi,

I'd like to be able to specify the regexp for substitutions.
Currently, I'm using {%= %}. Eg. {%= name %}
I would expect that any other pattern is ignored. However, {% name %} will be replaced by the empty string - not at all what I expected.

This is the result of a quick test:

``` bash
{%= name %}
{% name %}
{{% name %}}
<%= name %>
```

will be replaced by

``` bash
MyProject

{}
<%= name %>
```

The second and third line don't seem to be right. They should be ignored.

The original use case I had was scaffolding django templates, that also use the {% %} syntax. So, I'd like to be able to ignore those completely.

Any idea how to do that?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.