{"action":"created","comment":{"url":"https://api.github.com/repos/guillaumevincent/es6-template-render/pulls/comments/84319956","pull_request_review_id":5104972,"id":84319956,"diff_hunk":"@@ -1,11 +1,18 @@\n module.exports = function (string, context) {\n-  var key, find, re;\n+  return _recursive_rendering(string, context, '');\n+};\n \n-  for (key in context) {\n-    find = '\\\\$\\\\{\\\\s*' + key + '\\\\s*\\\\}';\n-    re = new RegExp(find, 'g');\n-    string = string.replace(re, context[key]);\n+function _recursive_rendering(string, context, stack) {\n+  for (var key in context) {\n+    if (context.hasOwnProperty(key)) {\n+      if(typeof context[key] === \"object\") {\n+        string = _recursive_rendering(string, context[key], (stack?`${stack}.`:'')+ key);","path":"index.js","position":14,"original_position":14,"commit_id":"545d437a00b70b13e9bd0a6e099bda272a8d146d","original_commit_id":"545d437a00b70b13e9bd0a6e099bda272a8d146d","user":{"login":"gabrielperales","id":1859128,"avatar_url":"https://avatars.githubusercontent.com/u/1859128?v=3","gravatar_id":"","url":"https://api.github.com/users/gabrielperales","html_url":"https://github.com/gabrielperales","followers_url":"https://api.github.com/users/gabrielperales/followers","following_url":"https://api.github.com/users/gabrielperales/following{/other_user}","gists_url":"https://api.github.com/users/gabrielperales/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielperales/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielperales/subscriptions","organizations_url":"https://api.github.com/users/gabrielperales/orgs","repos_url":"https://api.github.com/users/gabrielperales/repos","events_url":"https://api.github.com/users/gabrielperales/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielperales/received_events","type":"User","site_admin":false},"body":"template literals are not compatible with ES5. I think we can keep this library simple and avoid use babel to transpile code to do it ES5 compatible.","created_at":"2016-10-20T16:14:26Z","updated_at":"2016-10-20T16:14:26Z","html_url":"https://github.com/guillaumevincent/es6-template-render/pull/8#discussion_r84319956","pull_request_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/guillaumevincent/es6-template-render/pulls/comments/84319956"},"html":{"href":"https://github.com/guillaumevincent/es6-template-render/pull/8#discussion_r84319956"},"pull_request":{"href":"https://api.github.com/repos/guillaumevincent/es6-template-render/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/guillaumevincent/es6-template-render/pulls/8","id":90224609,"html_url":"https://github.com/guillaumevincent/es6-template-render/pull/8","diff_url":"https://github.com/guillaumevincent/es6-template-render/pull/8.diff","patch_url":"https://github.com/guillaumevincent/es6-template-render/pull/8.patch","issue_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/issues/8","number":8,"state":"open","locked":false,"title":"Object support ES5 compatible","user":{"login":"andreafalzetti","id":2318450,"avatar_url":"https://avatars.githubusercontent.com/u/2318450?v=3","gravatar_id":"","url":"https://api.github.com/users/andreafalzetti","html_url":"https://github.com/andreafalzetti","followers_url":"https://api.github.com/users/andreafalzetti/followers","following_url":"https://api.github.com/users/andreafalzetti/following{/other_user}","gists_url":"https://api.github.com/users/andreafalzetti/gists{/gist_id}","starred_url":"https://api.github.com/users/andreafalzetti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreafalzetti/subscriptions","organizations_url":"https://api.github.com/users/andreafalzetti/orgs","repos_url":"https://api.github.com/users/andreafalzetti/repos","events_url":"https://api.github.com/users/andreafalzetti/events{/privacy}","received_events_url":"https://api.github.com/users/andreafalzetti/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-20T15:30:59Z","updated_at":"2016-10-20T16:14:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9d75a26da69c8c0d382071b1a3f48ab49a16d224","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/pulls/8/commits","review_comments_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/pulls/8/comments","review_comment_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/issues/8/comments","statuses_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/statuses/545d437a00b70b13e9bd0a6e099bda272a8d146d","head":{"label":"andreafalzetti:patch-1","ref":"patch-1","sha":"545d437a00b70b13e9bd0a6e099bda272a8d146d","user":{"login":"andreafalzetti","id":2318450,"avatar_url":"https://avatars.githubusercontent.com/u/2318450?v=3","gravatar_id":"","url":"https://api.github.com/users/andreafalzetti","html_url":"https://github.com/andreafalzetti","followers_url":"https://api.github.com/users/andreafalzetti/followers","following_url":"https://api.github.com/users/andreafalzetti/following{/other_user}","gists_url":"https://api.github.com/users/andreafalzetti/gists{/gist_id}","starred_url":"https://api.github.com/users/andreafalzetti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreafalzetti/subscriptions","organizations_url":"https://api.github.com/users/andreafalzetti/orgs","repos_url":"https://api.github.com/users/andreafalzetti/repos","events_url":"https://api.github.com/users/andreafalzetti/events{/privacy}","received_events_url":"https://api.github.com/users/andreafalzetti/received_events","type":"User","site_admin":false},"repo":{"id":71474811,"name":"es6-template-render","full_name":"andreafalzetti/es6-template-render","owner":{"login":"andreafalzetti","id":2318450,"avatar_url":"https://avatars.githubusercontent.com/u/2318450?v=3","gravatar_id":"","url":"https://api.github.com/users/andreafalzetti","html_url":"https://github.com/andreafalzetti","followers_url":"https://api.github.com/users/andreafalzetti/followers","following_url":"https://api.github.com/users/andreafalzetti/following{/other_user}","gists_url":"https://api.github.com/users/andreafalzetti/gists{/gist_id}","starred_url":"https://api.github.com/users/andreafalzetti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreafalzetti/subscriptions","organizations_url":"https://api.github.com/users/andreafalzetti/orgs","repos_url":"https://api.github.com/users/andreafalzetti/repos","events_url":"https://api.github.com/users/andreafalzetti/events{/privacy}","received_events_url":"https://api.github.com/users/andreafalzetti/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andreafalzetti/es6-template-render","description":null,"fork":true,"url":"https://api.github.com/repos/andreafalzetti/es6-template-render","forks_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/forks","keys_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/teams","hooks_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/hooks","issue_events_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/issues/events{/number}","events_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/events","assignees_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/assignees{/user}","branches_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/branches{/branch}","tags_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/tags","blobs_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/git/refs{/sha}","trees_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/statuses/{sha}","languages_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/languages","stargazers_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/stargazers","contributors_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/contributors","subscribers_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/subscribers","subscription_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/subscription","commits_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/commits{/sha}","git_commits_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/git/commits{/sha}","comments_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/comments{/number}","issue_comment_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/issues/comments{/number}","contents_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/contents/{+path}","compare_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/merges","archive_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/downloads","issues_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/issues{/number}","pulls_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/pulls{/number}","milestones_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/milestones{/number}","notifications_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/labels{/name}","releases_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/releases{/id}","deployments_url":"https://api.github.com/repos/andreafalzetti/es6-template-render/deployments","created_at":"2016-10-20T15:05:06Z","updated_at":"2016-10-20T15:05:07Z","pushed_at":"2016-10-20T15:32:51Z","git_url":"git://github.com/andreafalzetti/es6-template-render.git","ssh_url":"git@github.com:andreafalzetti/es6-template-render.git","clone_url":"https://github.com/andreafalzetti/es6-template-render.git","svn_url":"https://github.com/andreafalzetti/es6-template-render","homepage":null,"size":12,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"guillaumevincent:master","ref":"master","sha":"f6dc19ac8fb404e036ae63b50a2d3c2723bd4e48","user":{"login":"guillaumevincent","id":943762,"avatar_url":"https://avatars.githubusercontent.com/u/943762?v=3","gravatar_id":"","url":"https://api.github.com/users/guillaumevincent","html_url":"https://github.com/guillaumevincent","followers_url":"https://api.github.com/users/guillaumevincent/followers","following_url":"https://api.github.com/users/guillaumevincent/following{/other_user}","gists_url":"https://api.github.com/users/guillaumevincent/gists{/gist_id}","starred_url":"https://api.github.com/users/guillaumevincent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guillaumevincent/subscriptions","organizations_url":"https://api.github.com/users/guillaumevincent/orgs","repos_url":"https://api.github.com/users/guillaumevincent/repos","events_url":"https://api.github.com/users/guillaumevincent/events{/privacy}","received_events_url":"https://api.github.com/users/guillaumevincent/received_events","type":"User","site_admin":false},"repo":{"id":68824916,"name":"es6-template-render","full_name":"guillaumevincent/es6-template-render","owner":{"login":"guillaumevincent","id":943762,"avatar_url":"https://avatars.githubusercontent.com/u/943762?v=3","gravatar_id":"","url":"https://api.github.com/users/guillaumevincent","html_url":"https://github.com/guillaumevincent","followers_url":"https://api.github.com/users/guillaumevincent/followers","following_url":"https://api.github.com/users/guillaumevincent/following{/other_user}","gists_url":"https://api.github.com/users/guillaumevincent/gists{/gist_id}","starred_url":"https://api.github.com/users/guillaumevincent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guillaumevincent/subscriptions","organizations_url":"https://api.github.com/users/guillaumevincent/orgs","repos_url":"https://api.github.com/users/guillaumevincent/repos","events_url":"https://api.github.com/users/guillaumevincent/events{/privacy}","received_events_url":"https://api.github.com/users/guillaumevincent/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/guillaumevincent/es6-template-render","description":null,"fork":false,"url":"https://api.github.com/repos/guillaumevincent/es6-template-render","forks_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/forks","keys_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/teams","hooks_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/hooks","issue_events_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/issues/events{/number}","events_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/events","assignees_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/assignees{/user}","branches_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/branches{/branch}","tags_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/tags","blobs_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/git/refs{/sha}","trees_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/statuses/{sha}","languages_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/languages","stargazers_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/stargazers","contributors_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/contributors","subscribers_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/subscribers","subscription_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/subscription","commits_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/commits{/sha}","git_commits_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/git/commits{/sha}","comments_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/comments{/number}","issue_comment_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/issues/comments{/number}","contents_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/contents/{+path}","compare_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/merges","archive_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/downloads","issues_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/issues{/number}","pulls_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/pulls{/number}","milestones_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/milestones{/number}","notifications_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/labels{/name}","releases_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/releases{/id}","deployments_url":"https://api.github.com/repos/guillaumevincent/es6-template-render/deployments","created_at":"2016-09-21T14:24:05Z","updated_at":"2016-10-20T13:16:10Z","pushed_at":"2016-10-20T15:33:02Z","git_url":"git://github.com/guillaumevincent/es6-template-render.git","ssh_url":"git@github.com:guillaumevincent/es6-template-render.git","clone_url":"https://github.com/guillaumevincent/es6-template-render.git","svn_url":"https://github.com/guillaumevincent/es6-template-render","homepage":null,"size":10,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guillaumevincent/es6-template-render/pulls/8"},"html":{"href":"https://github.com/guillaumevincent/es6-template-render/pull/8"},"issue":{"href":"https://api.github.com/repos/guillaumevincent/es6-template-render/issues/8"},"comments":{"href":"https://api.github.com/repos/guillaumevincent/es6-template-render/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/guillaumevincent/es6-template-render/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/guillaumevincent/es6-template-render/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guillaumevincent/es6-template-render/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/guillaumevincent/es6-template-render/statuses/545d437a00b70b13e9bd0a6e099bda272a8d146d"}}}}
{"actor":{"display_login":"gabrielperales"}}