How to disable comments on the "branch"?

  • I use gulp-twigand handlebars.jsin the draft
  • I work in the index.twig file
  • In a branch, the symbol #means comment.

For the handlebars template I need to use a string. {{#each}} But twigtreats this as a comment, what should I do?

I apologize for bad English

+4
source share
2 answers

You can try using verbatim as follows:

{% verbatim %}
    ....
    {{#each}}
    ....
{% endverbatim %}

Code between verbatim labels is not parsed.

+2
source

Source: https://habr.com/ru/post/1672249/


All Articles