Skip to content

Extends directive not working porperly #895

@marmz

Description

@marmz
<!-- test.twig -->
{% extends "rocks.twig" %}
 100%


<!-- rocks.twig -->
{{ name}} rocks!


<!-- index.html -->
<script>
            const template = twig({
                href: 'test.twig',
                async: false
             });
            
            alert( template.render({name: 'Dario'}) );
</script>


<!-- result alert message -->
Dario rocks!


<!-- instead of -->
Dario rocks! 100%

So it seems that extending template is ignoring its own code after "extends" directive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions