{"action":"created","issue":{"url":"https://api.github.com/repos/kylekatarnls/jade-php/issues/70","repository_url":"https://api.github.com/repos/kylekatarnls/jade-php","labels_url":"https://api.github.com/repos/kylekatarnls/jade-php/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/kylekatarnls/jade-php/issues/70/comments","events_url":"https://api.github.com/repos/kylekatarnls/jade-php/issues/70/events","html_url":"https://github.com/kylekatarnls/jade-php/issues/70","id":140671245,"number":70,"title":"Set output indentation level","user":{"login":"kylekatarnls","id":5966783,"avatar_url":"https://avatars.githubusercontent.com/u/5966783?v=3","gravatar_id":"","url":"https://api.github.com/users/kylekatarnls","html_url":"https://github.com/kylekatarnls","followers_url":"https://api.github.com/users/kylekatarnls/followers","following_url":"https://api.github.com/users/kylekatarnls/following{/other_user}","gists_url":"https://api.github.com/users/kylekatarnls/gists{/gist_id}","starred_url":"https://api.github.com/users/kylekatarnls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylekatarnls/subscriptions","organizations_url":"https://api.github.com/users/kylekatarnls/orgs","repos_url":"https://api.github.com/users/kylekatarnls/repos","events_url":"https://api.github.com/users/kylekatarnls/events{/privacy}","received_events_url":"https://api.github.com/users/kylekatarnls/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kylekatarnls/jade-php/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/kylekatarnls/jade-php/milestones/5","html_url":"https://github.com/kylekatarnls/jade-php/milestones/1.10","labels_url":"https://api.github.com/repos/kylekatarnls/jade-php/milestones/5/labels","id":1642876,"number":5,"title":"1.10","description":null,"creator":{"login":"kylekatarnls","id":5966783,"avatar_url":"https://avatars.githubusercontent.com/u/5966783?v=3","gravatar_id":"","url":"https://api.github.com/users/kylekatarnls","html_url":"https://github.com/kylekatarnls","followers_url":"https://api.github.com/users/kylekatarnls/followers","following_url":"https://api.github.com/users/kylekatarnls/following{/other_user}","gists_url":"https://api.github.com/users/kylekatarnls/gists{/gist_id}","starred_url":"https://api.github.com/users/kylekatarnls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylekatarnls/subscriptions","organizations_url":"https://api.github.com/users/kylekatarnls/orgs","repos_url":"https://api.github.com/users/kylekatarnls/repos","events_url":"https://api.github.com/users/kylekatarnls/events{/privacy}","received_events_url":"https://api.github.com/users/kylekatarnls/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2016-03-14T13:20:12Z","updated_at":"2016-03-14T13:20:28Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-03-14T13:19:42Z","updated_at":"2016-03-20T09:33:07Z","closed_at":null,"body":"Extracted from @volter9 issue #18:\r\n\r\nSet output indentation level to a certain number of spaces or tab."},"comment":{"url":"https://api.github.com/repos/kylekatarnls/jade-php/issues/comments/198882181","html_url":"https://github.com/kylekatarnls/jade-php/issues/70#issuecomment-198882181","issue_url":"https://api.github.com/repos/kylekatarnls/jade-php/issues/70","id":198882181,"user":{"login":"kylekatarnls","id":5966783,"avatar_url":"https://avatars.githubusercontent.com/u/5966783?v=3","gravatar_id":"","url":"https://api.github.com/users/kylekatarnls","html_url":"https://github.com/kylekatarnls","followers_url":"https://api.github.com/users/kylekatarnls/followers","following_url":"https://api.github.com/users/kylekatarnls/following{/other_user}","gists_url":"https://api.github.com/users/kylekatarnls/gists{/gist_id}","starred_url":"https://api.github.com/users/kylekatarnls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylekatarnls/subscriptions","organizations_url":"https://api.github.com/users/kylekatarnls/orgs","repos_url":"https://api.github.com/users/kylekatarnls/repos","events_url":"https://api.github.com/users/kylekatarnls/events{/privacy}","received_events_url":"https://api.github.com/users/kylekatarnls/received_events","type":"User","site_admin":false},"created_at":"2016-03-20T09:33:07Z","updated_at":"2016-03-20T09:33:07Z","body":"With this template:\r\n```jade\r\nbody\r\n  header\r\n    h1 Hello!\r\n  section\r\n    article\r\n      p Bye!\r\n```\r\n\r\nWith the prettyprint setting and the default indent settings (indentSize = 2, indentChar = \" \") will output:\r\n```html\r\n<body>\r\n  <header>\r\n    <h1>Hello!</h1>\r\n  </header>\r\n  <section>\r\n    <article>\r\n      <p>Bye!</p>\r\n    </article>\r\n  </section>\r\n</body>\r\n```\r\n\r\nTo get a 4-spaces indent, use this setting:\r\n```php\r\n$jade = new Jade(array(\r\n    'prettyprint' => true,\r\n    'indentSize' => 4,\r\n    'indentChar' => ' ',\r\n));\r\n```\r\n\r\nWill output:\r\n```html\r\n<body>\r\n    <header>\r\n        <h1>Hello!</h1>\r\n    </header>\r\n    <section>\r\n        <article>\r\n            <p>Bye!</p>\r\n        </article>\r\n    </section>\r\n</body>\r\n```\r\n\r\nOr you can use tabs:\r\n```php\r\n$jade = new Jade(array(\r\n    'prettyprint' => true,\r\n    'indentSize' => 1,\r\n    'indentChar' => \"\\t\",\r\n));\r\n```"}}