{"action":"created","comment":{"url":"https://api.github.com/repos/Keats/tera/pulls/comments/86688362","pull_request_review_id":7334501,"id":86688362,"diff_hunk":"@@ -364,3 +364,30 @@ Escapes a string's HTML. Specifically, it makes these replacements:\n - \" (double quote) is converted to &quot;\n - & is converted to &amp;\n \n+### Macros\n+Macros are a simple way to re-use template bits. Think of them as functions that you can call\n+and that returns some text.\n+\n+Macros are defined the following way:\n+\n+```jinja2\n+{% macro hello_world(greeting, language) %}\n+    {% if language == \"en\" %}\n+        {{ greeting }}\n+    {% endif %}\n+{% endmacro hello_world %}\n+```\n+\n+In order to be called, the file containing the macros needs to be loaded first in the file using them:","path":"README.md","position":27,"original_position":27,"commit_id":"1e2139a54f46a4f2757d6614a1de2748849538c2","original_commit_id":"1e2139a54f46a4f2757d6614a1de2748849538c2","user":{"login":"SergioBenitez","id":1480321,"avatar_url":"https://avatars.githubusercontent.com/u/1480321?v=3","gravatar_id":"","url":"https://api.github.com/users/SergioBenitez","html_url":"https://github.com/SergioBenitez","followers_url":"https://api.github.com/users/SergioBenitez/followers","following_url":"https://api.github.com/users/SergioBenitez/following{/other_user}","gists_url":"https://api.github.com/users/SergioBenitez/gists{/gist_id}","starred_url":"https://api.github.com/users/SergioBenitez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SergioBenitez/subscriptions","organizations_url":"https://api.github.com/users/SergioBenitez/orgs","repos_url":"https://api.github.com/users/SergioBenitez/repos","events_url":"https://api.github.com/users/SergioBenitez/events{/privacy}","received_events_url":"https://api.github.com/users/SergioBenitez/received_events","type":"User","site_admin":false},"body":"The wording here is a bit odd.","created_at":"2016-11-06T15:11:02Z","updated_at":"2016-11-06T15:11:02Z","html_url":"https://github.com/Keats/tera/pull/69#discussion_r86688362","pull_request_url":"https://api.github.com/repos/Keats/tera/pulls/69","_links":{"self":{"href":"https://api.github.com/repos/Keats/tera/pulls/comments/86688362"},"html":{"href":"https://github.com/Keats/tera/pull/69#discussion_r86688362"},"pull_request":{"href":"https://api.github.com/repos/Keats/tera/pulls/69"}}},"pull_request":{"url":"https://api.github.com/repos/Keats/tera/pulls/69","id":89931045,"html_url":"https://github.com/Keats/tera/pull/69","diff_url":"https://github.com/Keats/tera/pull/69.diff","patch_url":"https://github.com/Keats/tera/pull/69.patch","issue_url":"https://api.github.com/repos/Keats/tera/issues/69","number":69,"state":"open","locked":false,"title":"WIP macros","user":{"login":"Keats","id":680355,"avatar_url":"https://avatars.githubusercontent.com/u/680355?v=3","gravatar_id":"","url":"https://api.github.com/users/Keats","html_url":"https://github.com/Keats","followers_url":"https://api.github.com/users/Keats/followers","following_url":"https://api.github.com/users/Keats/following{/other_user}","gists_url":"https://api.github.com/users/Keats/gists{/gist_id}","starred_url":"https://api.github.com/users/Keats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Keats/subscriptions","organizations_url":"https://api.github.com/users/Keats/orgs","repos_url":"https://api.github.com/users/Keats/repos","events_url":"https://api.github.com/users/Keats/events{/privacy}","received_events_url":"https://api.github.com/users/Keats/received_events","type":"User","site_admin":false},"body":"Also uniformize function call args between macros and filters\n","created_at":"2016-10-19T02:17:02Z","updated_at":"2016-11-06T15:43:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"896b9eb60ff86fc04a16dfbc2c0e45d49a8dc20a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Keats/tera/pulls/69/commits","review_comments_url":"https://api.github.com/repos/Keats/tera/pulls/69/comments","review_comment_url":"https://api.github.com/repos/Keats/tera/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Keats/tera/issues/69/comments","statuses_url":"https://api.github.com/repos/Keats/tera/statuses/1e2139a54f46a4f2757d6614a1de2748849538c2","head":{"label":"Keats:macros","ref":"macros","sha":"1e2139a54f46a4f2757d6614a1de2748849538c2","user":{"login":"Keats","id":680355,"avatar_url":"https://avatars.githubusercontent.com/u/680355?v=3","gravatar_id":"","url":"https://api.github.com/users/Keats","html_url":"https://github.com/Keats","followers_url":"https://api.github.com/users/Keats/followers","following_url":"https://api.github.com/users/Keats/following{/other_user}","gists_url":"https://api.github.com/users/Keats/gists{/gist_id}","starred_url":"https://api.github.com/users/Keats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Keats/subscriptions","organizations_url":"https://api.github.com/users/Keats/orgs","repos_url":"https://api.github.com/users/Keats/repos","events_url":"https://api.github.com/users/Keats/events{/privacy}","received_events_url":"https://api.github.com/users/Keats/received_events","type":"User","site_admin":false},"repo":{"id":39272160,"name":"tera","full_name":"Keats/tera","owner":{"login":"Keats","id":680355,"avatar_url":"https://avatars.githubusercontent.com/u/680355?v=3","gravatar_id":"","url":"https://api.github.com/users/Keats","html_url":"https://github.com/Keats","followers_url":"https://api.github.com/users/Keats/followers","following_url":"https://api.github.com/users/Keats/following{/other_user}","gists_url":"https://api.github.com/users/Keats/gists{/gist_id}","starred_url":"https://api.github.com/users/Keats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Keats/subscriptions","organizations_url":"https://api.github.com/users/Keats/orgs","repos_url":"https://api.github.com/users/Keats/repos","events_url":"https://api.github.com/users/Keats/events{/privacy}","received_events_url":"https://api.github.com/users/Keats/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Keats/tera","description":"A template engine for Rust based on Jinja2/Django","fork":false,"url":"https://api.github.com/repos/Keats/tera","forks_url":"https://api.github.com/repos/Keats/tera/forks","keys_url":"https://api.github.com/repos/Keats/tera/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Keats/tera/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Keats/tera/teams","hooks_url":"https://api.github.com/repos/Keats/tera/hooks","issue_events_url":"https://api.github.com/repos/Keats/tera/issues/events{/number}","events_url":"https://api.github.com/repos/Keats/tera/events","assignees_url":"https://api.github.com/repos/Keats/tera/assignees{/user}","branches_url":"https://api.github.com/repos/Keats/tera/branches{/branch}","tags_url":"https://api.github.com/repos/Keats/tera/tags","blobs_url":"https://api.github.com/repos/Keats/tera/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Keats/tera/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Keats/tera/git/refs{/sha}","trees_url":"https://api.github.com/repos/Keats/tera/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Keats/tera/statuses/{sha}","languages_url":"https://api.github.com/repos/Keats/tera/languages","stargazers_url":"https://api.github.com/repos/Keats/tera/stargazers","contributors_url":"https://api.github.com/repos/Keats/tera/contributors","subscribers_url":"https://api.github.com/repos/Keats/tera/subscribers","subscription_url":"https://api.github.com/repos/Keats/tera/subscription","commits_url":"https://api.github.com/repos/Keats/tera/commits{/sha}","git_commits_url":"https://api.github.com/repos/Keats/tera/git/commits{/sha}","comments_url":"https://api.github.com/repos/Keats/tera/comments{/number}","issue_comment_url":"https://api.github.com/repos/Keats/tera/issues/comments{/number}","contents_url":"https://api.github.com/repos/Keats/tera/contents/{+path}","compare_url":"https://api.github.com/repos/Keats/tera/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Keats/tera/merges","archive_url":"https://api.github.com/repos/Keats/tera/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Keats/tera/downloads","issues_url":"https://api.github.com/repos/Keats/tera/issues{/number}","pulls_url":"https://api.github.com/repos/Keats/tera/pulls{/number}","milestones_url":"https://api.github.com/repos/Keats/tera/milestones{/number}","notifications_url":"https://api.github.com/repos/Keats/tera/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Keats/tera/labels{/name}","releases_url":"https://api.github.com/repos/Keats/tera/releases{/id}","deployments_url":"https://api.github.com/repos/Keats/tera/deployments","created_at":"2015-07-17T19:40:53Z","updated_at":"2016-10-27T16:06:26Z","pushed_at":"2016-11-04T11:58:17Z","git_url":"git://github.com/Keats/tera.git","ssh_url":"git@github.com:Keats/tera.git","clone_url":"https://github.com/Keats/tera.git","svn_url":"https://github.com/Keats/tera","homepage":"","size":329,"stargazers_count":145,"watchers_count":145,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":11,"forks":18,"open_issues":11,"watchers":145,"default_branch":"master"}},"base":{"label":"Keats:master","ref":"master","sha":"7c29ae484369fbec49490542ef1363183a05bca7","user":{"login":"Keats","id":680355,"avatar_url":"https://avatars.githubusercontent.com/u/680355?v=3","gravatar_id":"","url":"https://api.github.com/users/Keats","html_url":"https://github.com/Keats","followers_url":"https://api.github.com/users/Keats/followers","following_url":"https://api.github.com/users/Keats/following{/other_user}","gists_url":"https://api.github.com/users/Keats/gists{/gist_id}","starred_url":"https://api.github.com/users/Keats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Keats/subscriptions","organizations_url":"https://api.github.com/users/Keats/orgs","repos_url":"https://api.github.com/users/Keats/repos","events_url":"https://api.github.com/users/Keats/events{/privacy}","received_events_url":"https://api.github.com/users/Keats/received_events","type":"User","site_admin":false},"repo":{"id":39272160,"name":"tera","full_name":"Keats/tera","owner":{"login":"Keats","id":680355,"avatar_url":"https://avatars.githubusercontent.com/u/680355?v=3","gravatar_id":"","url":"https://api.github.com/users/Keats","html_url":"https://github.com/Keats","followers_url":"https://api.github.com/users/Keats/followers","following_url":"https://api.github.com/users/Keats/following{/other_user}","gists_url":"https://api.github.com/users/Keats/gists{/gist_id}","starred_url":"https://api.github.com/users/Keats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Keats/subscriptions","organizations_url":"https://api.github.com/users/Keats/orgs","repos_url":"https://api.github.com/users/Keats/repos","events_url":"https://api.github.com/users/Keats/events{/privacy}","received_events_url":"https://api.github.com/users/Keats/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Keats/tera","description":"A template engine for Rust based on Jinja2/Django","fork":false,"url":"https://api.github.com/repos/Keats/tera","forks_url":"https://api.github.com/repos/Keats/tera/forks","keys_url":"https://api.github.com/repos/Keats/tera/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Keats/tera/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Keats/tera/teams","hooks_url":"https://api.github.com/repos/Keats/tera/hooks","issue_events_url":"https://api.github.com/repos/Keats/tera/issues/events{/number}","events_url":"https://api.github.com/repos/Keats/tera/events","assignees_url":"https://api.github.com/repos/Keats/tera/assignees{/user}","branches_url":"https://api.github.com/repos/Keats/tera/branches{/branch}","tags_url":"https://api.github.com/repos/Keats/tera/tags","blobs_url":"https://api.github.com/repos/Keats/tera/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Keats/tera/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Keats/tera/git/refs{/sha}","trees_url":"https://api.github.com/repos/Keats/tera/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Keats/tera/statuses/{sha}","languages_url":"https://api.github.com/repos/Keats/tera/languages","stargazers_url":"https://api.github.com/repos/Keats/tera/stargazers","contributors_url":"https://api.github.com/repos/Keats/tera/contributors","subscribers_url":"https://api.github.com/repos/Keats/tera/subscribers","subscription_url":"https://api.github.com/repos/Keats/tera/subscription","commits_url":"https://api.github.com/repos/Keats/tera/commits{/sha}","git_commits_url":"https://api.github.com/repos/Keats/tera/git/commits{/sha}","comments_url":"https://api.github.com/repos/Keats/tera/comments{/number}","issue_comment_url":"https://api.github.com/repos/Keats/tera/issues/comments{/number}","contents_url":"https://api.github.com/repos/Keats/tera/contents/{+path}","compare_url":"https://api.github.com/repos/Keats/tera/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Keats/tera/merges","archive_url":"https://api.github.com/repos/Keats/tera/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Keats/tera/downloads","issues_url":"https://api.github.com/repos/Keats/tera/issues{/number}","pulls_url":"https://api.github.com/repos/Keats/tera/pulls{/number}","milestones_url":"https://api.github.com/repos/Keats/tera/milestones{/number}","notifications_url":"https://api.github.com/repos/Keats/tera/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Keats/tera/labels{/name}","releases_url":"https://api.github.com/repos/Keats/tera/releases{/id}","deployments_url":"https://api.github.com/repos/Keats/tera/deployments","created_at":"2015-07-17T19:40:53Z","updated_at":"2016-10-27T16:06:26Z","pushed_at":"2016-11-04T11:58:17Z","git_url":"git://github.com/Keats/tera.git","ssh_url":"git@github.com:Keats/tera.git","clone_url":"https://github.com/Keats/tera.git","svn_url":"https://github.com/Keats/tera","homepage":"","size":329,"stargazers_count":145,"watchers_count":145,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":11,"forks":18,"open_issues":11,"watchers":145,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Keats/tera/pulls/69"},"html":{"href":"https://github.com/Keats/tera/pull/69"},"issue":{"href":"https://api.github.com/repos/Keats/tera/issues/69"},"comments":{"href":"https://api.github.com/repos/Keats/tera/issues/69/comments"},"review_comments":{"href":"https://api.github.com/repos/Keats/tera/pulls/69/comments"},"review_comment":{"href":"https://api.github.com/repos/Keats/tera/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Keats/tera/pulls/69/commits"},"statuses":{"href":"https://api.github.com/repos/Keats/tera/statuses/1e2139a54f46a4f2757d6614a1de2748849538c2"}}}}
{"actor":{"display_login":"SergioBenitez"}}