{"action":"created","issue":{"url":"https://api.github.com/repos/prettydiff/prettydiff/issues/218","labels_url":"https://api.github.com/repos/prettydiff/prettydiff/issues/218/labels{/name}","comments_url":"https://api.github.com/repos/prettydiff/prettydiff/issues/218/comments","events_url":"https://api.github.com/repos/prettydiff/prettydiff/issues/218/events","html_url":"https://github.com/prettydiff/prettydiff/issues/218","id":119300782,"number":218,"title":"Language support: Twig","user":{"login":"johanneslamers","id":4696315,"avatar_url":"https://avatars.githubusercontent.com/u/4696315?v=3","gravatar_id":"","url":"https://api.github.com/users/johanneslamers","html_url":"https://github.com/johanneslamers","followers_url":"https://api.github.com/users/johanneslamers/followers","following_url":"https://api.github.com/users/johanneslamers/following{/other_user}","gists_url":"https://api.github.com/users/johanneslamers/gists{/gist_id}","starred_url":"https://api.github.com/users/johanneslamers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johanneslamers/subscriptions","organizations_url":"https://api.github.com/users/johanneslamers/orgs","repos_url":"https://api.github.com/users/johanneslamers/repos","events_url":"https://api.github.com/users/johanneslamers/events{/privacy}","received_events_url":"https://api.github.com/users/johanneslamers/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/prettydiff/prettydiff/labels/Enhancement","name":"Enhancement","color":"207de5"},{"url":"https://api.github.com/repos/prettydiff/prettydiff/labels/Not%20started","name":"Not started","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/prettydiff/prettydiff/milestones/37","html_url":"https://github.com/prettydiff/prettydiff/milestones/v1.19.0","labels_url":"https://api.github.com/repos/prettydiff/prettydiff/milestones/37/labels","id":1433649,"number":37,"title":"v1.19.0","description":null,"creator":{"login":"prettydiff","id":524902,"avatar_url":"https://avatars.githubusercontent.com/u/524902?v=3","gravatar_id":"","url":"https://api.github.com/users/prettydiff","html_url":"https://github.com/prettydiff","followers_url":"https://api.github.com/users/prettydiff/followers","following_url":"https://api.github.com/users/prettydiff/following{/other_user}","gists_url":"https://api.github.com/users/prettydiff/gists{/gist_id}","starred_url":"https://api.github.com/users/prettydiff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prettydiff/subscriptions","organizations_url":"https://api.github.com/users/prettydiff/orgs","repos_url":"https://api.github.com/users/prettydiff/repos","events_url":"https://api.github.com/users/prettydiff/events{/privacy}","received_events_url":"https://api.github.com/users/prettydiff/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2015-11-29T00:49:00Z","updated_at":"2015-11-29T00:49:00Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-11-28T15:11:49Z","updated_at":"2015-11-29T15:13:19Z","closed_at":null,"body":"Add support for twig markup language.\r\nTwig is a modern template engine for PHP.\r\n\r\nhttp://twig.sensiolabs.org/\r\n\r\n### This is my input:\r\n``` twig\r\n{% extends \"_layout/_layout\" %}\r\n\r\n{% if entry is not defined %}\r\n{% exit 404 %}\r\n{% endif %}\r\n\r\n{% set var = \"foo\" %}\r\n\r\n{% macro input(name, value, type, size) %}\r\n<input name=\"{{ name }}\" size=\"{{ size|default(20) }}\" type=\"{{ type|default('text') }}\" value=\"{{ value|e }}\"/>\r\n{% endmacro %}\r\n\r\n{% block blockname %}\r\n{# comment #}\r\n<section>\r\n    <ul>\r\n        <li>{{ var }}</li>\r\n    </ul>\r\n</section>\r\n{% for foo in bar %}\r\n{% if condition %}\r\n{% macro wrapped_input(name, value, type, size) %}\r\n{% import _self as forms %}\r\n{# comment #}\r\n<div class=\"field\">\r\n    {{ forms.input(name, value, type, size) }}\r\n</div>\r\n{% endmacro %}\r\n{% elseif kenny.dead %}\r\nto soon\r\n{% else %}\r\n<div class=\"test2\">\r\n    TestText3\r\n</div>\r\n{% endif %}\r\n{% endfor %}\r\n{% endblock %}\r\n\r\n{% set fruits = ['apple', 'orange', 'citrus'] %}\r\n\r\n{% for i in 0..10 %}\r\n{{ cycle(fruits, i) }}\r\n{% endfor %}\r\n```\r\n\r\n### This is what I expect:\r\n``` twig\r\n{% extends \"_layout/_layout\" %}\r\n\r\n{% if entry is not defined %}\r\n   {% exit 404 %}\r\n{% endif %}\r\n\r\n{% set var = \"foo\" %}\r\n\r\n{% macro input(name, value, type, size) %}\r\n    <input type=\"{{ type|default('text') }}\" name=\"{{ name }}\" value=\"{{ value|e }}\" size=\"{{ size|default(20) }}\" />\r\n{% endmacro %}\r\n\r\n{% block blockname %}\r\n    {# comment #}\r\n    <section>\r\n        <ul>\r\n            <li>{{ var }}</li>\r\n        </ul>\r\n    </section>\r\n    {% for foo in bar %}\r\n        {% if condition %}\r\n            {% macro wrapped_input(name, value, type, size) %}\r\n                {% import _self as forms %}\r\n                {# comment #}\r\n                <div class=\"field\">\r\n                    {{ forms.input(name, value, type, size) }}\r\n                </div>\r\n            {% endmacro %}\r\n        {% elseif kenny.dead %}\r\n            to soon\r\n        {% else %}\r\n            <div class=\"test2\">\r\n                TestText3\r\n            </div>\r\n        {% endif %}\r\n    {% endfor %}\r\n{% endblock %}\r\n\r\n{% set fruits = ['apple', 'orange', 'citrus'] %}\r\n\r\n{% for i in 0..10 %}\r\n    {{ cycle(fruits, i) }}\r\n{% endfor %}\r\n```\r\n\r\nWho is using twig as template language?\r\n- Craft CMS\r\n- Symfony\r\n- Drupal\r\n- Bolt\r\n"},"comment":{"url":"https://api.github.com/repos/prettydiff/prettydiff/issues/comments/160421824","html_url":"https://github.com/prettydiff/prettydiff/issues/218#issuecomment-160421824","issue_url":"https://api.github.com/repos/prettydiff/prettydiff/issues/218","id":160421824,"user":{"login":"keithmancuso","id":275913,"avatar_url":"https://avatars.githubusercontent.com/u/275913?v=3","gravatar_id":"","url":"https://api.github.com/users/keithmancuso","html_url":"https://github.com/keithmancuso","followers_url":"https://api.github.com/users/keithmancuso/followers","following_url":"https://api.github.com/users/keithmancuso/following{/other_user}","gists_url":"https://api.github.com/users/keithmancuso/gists{/gist_id}","starred_url":"https://api.github.com/users/keithmancuso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keithmancuso/subscriptions","organizations_url":"https://api.github.com/users/keithmancuso/orgs","repos_url":"https://api.github.com/users/keithmancuso/repos","events_url":"https://api.github.com/users/keithmancuso/events{/privacy}","received_events_url":"https://api.github.com/users/keithmancuso/received_events","type":"User","site_admin":false},"created_at":"2015-11-29T15:13:19Z","updated_at":"2015-11-29T15:13:19Z","body":"+1"}}