{"action":"closed","issue":{"url":"https://api.github.com/repos/pugjs/pug/issues/2505","repository_url":"https://api.github.com/repos/pugjs/pug","labels_url":"https://api.github.com/repos/pugjs/pug/issues/2505/labels{/name}","comments_url":"https://api.github.com/repos/pugjs/pug/issues/2505/comments","events_url":"https://api.github.com/repos/pugjs/pug/issues/2505/events","html_url":"https://github.com/pugjs/pug/issues/2505","id":173646930,"number":2505,"title":"Idea: a shortened syntax for elements which have only one child","user":{"login":"lazytyper","id":5507298,"avatar_url":"https://avatars.githubusercontent.com/u/5507298?v=3","gravatar_id":"","url":"https://api.github.com/users/lazytyper","html_url":"https://github.com/lazytyper","followers_url":"https://api.github.com/users/lazytyper/followers","following_url":"https://api.github.com/users/lazytyper/following{/other_user}","gists_url":"https://api.github.com/users/lazytyper/gists{/gist_id}","starred_url":"https://api.github.com/users/lazytyper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lazytyper/subscriptions","organizations_url":"https://api.github.com/users/lazytyper/orgs","repos_url":"https://api.github.com/users/lazytyper/repos","events_url":"https://api.github.com/users/lazytyper/events{/privacy}","received_events_url":"https://api.github.com/users/lazytyper/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-28T13:32:20Z","updated_at":"2016-08-28T15:15:05Z","closed_at":"2016-08-28T15:15:05Z","body":"This code\r\n\r\n``` pug\r\nspan.parent\r\n  span.child\r\n    span.grandchild (some text)\r\nspan.next\r\n```\r\n\r\ncould be shortened to\r\n\r\n```\r\nspan.parent>span.child>span.grandchild (some text)\r\nspan.next\r\n```\r\n\r\nor, if spaces are supported:\r\n\r\n```\r\nspan.parent > span.child > span.grandchild (some text)\r\nspan.next\r\n```\r\n\r\nThis shortened syntax makes only sense for elements which have only one child.\r\nIf an element has more children, you can't use the '>'-operator:\r\n\r\n``` pug\r\nspan.parent\r\n  span.child\r\n    span.grandchild (some text)\r\n    span.grandchild (some text)\r\nspan.next\r\n```\r\n\r\n```\r\nspan.parent>span.child\r\n  span.grandchild (some text)\r\n  span.grandchild (some text)\r\nspan.next\r\n```\r\n\r\nThis shortened syntax can reduce some lines and indents if many of those \"elements-with-only-one-child\" exist."}}
{"actor":{"display_login":"TimothyGu"}}