prettier-plugin-twig-melody icon indicating copy to clipboard operation
prettier-plugin-twig-melody copied to clipboard

Formatting macro with default arguments throws error

Open spider-mane opened this issue 4 years ago • 1 comments

i get ERROR: Expected comma or ")" when attempting to format a macro with default parameter values such as

{% macro name(name = 'John') %}
  <h1>{{ name }}</h1>
{% endmacro %}

It's followed by The argument list of a macro can only consist of parameter names separated by commas.

Is this a mistake? Default arguments are valid after all.

spider-mane avatar Apr 08 '20 23:04 spider-mane

Same error here. Is there any way to ignore it?

FNGR2911 avatar Jan 26 '22 11:01 FNGR2911