Last active
April 24, 2018 00:25
-
-
Save tremby/62df667cf9fb9dc7a303 to your computer and use it in GitHub Desktop.
Twig.js bug breaking case
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test2layout.twig 1 [foo] [bar] | |
test2page.twig 1 [foo] [] | |
test2.twig 1 [foo] [] [baz] | |
test2template.twig 1 [] [] [baz] | |
test2.twig 2 [] [] [baz] | |
test2template.twig 2 [] [] [baz] | |
test2.twig 3 [foo] [] [baz] | |
test2page.twig 2 [foo] [] | |
test2layout.twig 2 [foo] [bar] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Twig = require './twig' | |
template = Twig.twig | |
id: 'test2template.twig' | |
path: 'test2template.twig' | |
async: false | |
layout = Twig.twig | |
id: 'test2layout.twig' | |
path: 'test2layout.twig' | |
async: false | |
page = Twig.twig | |
id: 'test2page.twig' | |
path: 'test2page.twig' | |
async: false | |
test2 = Twig.twig | |
id: 'test2.twig' | |
path: 'test2.twig' | |
async: false | |
console.log page.render | |
foo: 'foo' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set baz = 'baz' %} | |
test2.twig 1 [{{foo}}] [{{bar}}] [{{baz}}] | |
{% embed 'test2template.twig' %} | |
{% block content %} | |
test2.twig 2 [{{foo}}] [{{bar}}] [{{baz}}] | |
{% endblock %} | |
{% endembed %} | |
test2.twig 3 [{{foo}}] [{{bar}}] [{{baz}}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set bar = 'bar' %} | |
test2layout.twig 1 [{{foo}}] [{{bar}}] | |
{% block layoutblock %}{% endblock %} | |
test2layout.twig 2 [{{foo}}] [{{bar}}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends 'test2layout.twig' %} | |
{% block layoutblock %} | |
test2page.twig 1 [{{foo}}] [{{bar}}] | |
{% include 'test2.twig' %} | |
test2page.twig 2 [{{foo}}] [{{bar}}] | |
{% endblock %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test2template.twig 1 [{{foo}}] [{{bar}}] [{{baz}}] | |
{% block content %}{% endblock %} | |
test2template.twig 2 [{{foo}}] [{{bar}}] [{{baz}}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This has been working properly in twig.js since d14a845, and the first working tag since then is v1.11.0.