Skip to content

[TwigComponent] namespace double dot isn't parsed correctly #803

Closed
@Jupi007

Description

@Jupi007

First of all, thanks for this awesome component!

I noticed that create a twig component using a namespace wasn't working as expected using some syntaxes.

Let's assume a component named foo:bar.
Using quotes, it works as expected:

{% component 'foo:bar' %}
  {# ... #}
{% endcomponent %}

But if I try the same without quotes or using the html syntax:

{% component foo:bar %}
  {# ... #}
{% endcomponent %}

{# OR #}

<twig:foo:bar>
  {# ... #}
</twig:foo:bar>

This throw a SyntaxError:

An exception has been thrown during the compilation of a template ("Unknown component "foo". The registered components are: foo:bar").

As you can see, it is only taking in account the namespace as component name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugBug Fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions