{"action":"created","issue":{"url":"https://api.github.com/repos/mde/ejs/issues/176","repository_url":"https://api.github.com/repos/mde/ejs","labels_url":"https://api.github.com/repos/mde/ejs/issues/176/labels{/name}","comments_url":"https://api.github.com/repos/mde/ejs/issues/176/comments","events_url":"https://api.github.com/repos/mde/ejs/issues/176/events","html_url":"https://github.com/mde/ejs/issues/176","id":159464233,"number":176,"title":"[feature] include should preserve indention","user":{"login":"a86c6f7964","id":165381,"avatar_url":"https://avatars.githubusercontent.com/u/165381?v=3","gravatar_id":"","url":"https://api.github.com/users/a86c6f7964","html_url":"https://github.com/a86c6f7964","followers_url":"https://api.github.com/users/a86c6f7964/followers","following_url":"https://api.github.com/users/a86c6f7964/following{/other_user}","gists_url":"https://api.github.com/users/a86c6f7964/gists{/gist_id}","starred_url":"https://api.github.com/users/a86c6f7964/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a86c6f7964/subscriptions","organizations_url":"https://api.github.com/users/a86c6f7964/orgs","repos_url":"https://api.github.com/users/a86c6f7964/repos","events_url":"https://api.github.com/users/a86c6f7964/events{/privacy}","received_events_url":"https://api.github.com/users/a86c6f7964/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mde/ejs/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-06-09T17:28:31Z","updated_at":"2016-06-13T11:21:22Z","closed_at":"2016-06-11T00:54:54Z","body":"If someone does\r\n```\r\n<p>\r\n  <%- include('other.ejs') %>\r\n</p>\r\n```\r\n and other.ejs is\r\n```\r\n<div>\r\n  <b>HELLO</b>\r\n</div>\r\n```\r\nThen it should look like\r\n```\r\n<p>\r\n  <div>\r\n    <b>HELLO</b>\r\n  </div>\r\n</p>\r\n```\r\nInstead of\r\n```\r\n<p>\r\n  <div>\r\n  <b>HELLO</b>\r\n</div>\r\n</p>\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/mde/ejs/issues/comments/225554278","html_url":"https://github.com/mde/ejs/issues/176#issuecomment-225554278","issue_url":"https://api.github.com/repos/mde/ejs/issues/176","id":225554278,"user":{"login":"RyanZim","id":17342435,"avatar_url":"https://avatars.githubusercontent.com/u/17342435?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanZim","html_url":"https://github.com/RyanZim","followers_url":"https://api.github.com/users/RyanZim/followers","following_url":"https://api.github.com/users/RyanZim/following{/other_user}","gists_url":"https://api.github.com/users/RyanZim/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanZim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanZim/subscriptions","organizations_url":"https://api.github.com/users/RyanZim/orgs","repos_url":"https://api.github.com/users/RyanZim/repos","events_url":"https://api.github.com/users/RyanZim/events{/privacy}","received_events_url":"https://api.github.com/users/RyanZim/received_events","type":"User","site_admin":false},"created_at":"2016-06-13T11:21:22Z","updated_at":"2016-06-13T11:21:22Z","body":"BTW, you could also write your own function, like this:\r\n```\r\nfunction indent(text, depth) {\r\n  var output='';\r\n  text.split(\"\\n\").foreach(function(line, num){\r\n    // To avoid indenting the first line\r\n    if(num>0){\r\n      for(var i=0;i<depth;i++){\r\n        line=line+' ';\r\n      }\r\n    }\r\n    output+=line;\r\n  });\r\n}\r\n```\r\n\r\nThen you could do something like `<%- indent(include('filename'), 4) %>` if you wanted the include to be indented 4 spaces."}}
{"actor":{"display_login":"RyanZim"}}