{"action":"closed","issue":{"url":"https://api.github.com/repos/microformats/tests/issues/52","repository_url":"https://api.github.com/repos/microformats/tests","labels_url":"https://api.github.com/repos/microformats/tests/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/microformats/tests/issues/52/comments","events_url":"https://api.github.com/repos/microformats/tests/issues/52/events","html_url":"https://github.com/microformats/tests/issues/52","id":158565129,"number":52,"title":"Should implied properties be used for parent of nested h-x?","user":{"login":"willnorris","id":1112,"avatar_url":"https://avatars.githubusercontent.com/u/1112?v=3","gravatar_id":"","url":"https://api.github.com/users/willnorris","html_url":"https://github.com/willnorris","followers_url":"https://api.github.com/users/willnorris/followers","following_url":"https://api.github.com/users/willnorris/following{/other_user}","gists_url":"https://api.github.com/users/willnorris/gists{/gist_id}","starred_url":"https://api.github.com/users/willnorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willnorris/subscriptions","organizations_url":"https://api.github.com/users/willnorris/orgs","repos_url":"https://api.github.com/users/willnorris/repos","events_url":"https://api.github.com/users/willnorris/events{/privacy}","received_events_url":"https://api.github.com/users/willnorris/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-05T17:34:59Z","updated_at":"2016-06-12T03:52:51Z","closed_at":"2016-06-12T03:52:51Z","body":"The `microformats-v2/h-card/impliedname` test [includes the following case](https://github.com/microformats/tests/blob/17d31dbeb3d64426d5a15548ea778f61df73c28f/tests/microformats-v2/h-card/impliedname.html#L15):\r\n\r\n```html\r\n<div class=\"h-card\"><span class=\"h-card\"><img src=\"john.html\" alt=\"John Doe\"/>Name</span></div>\r\n```\r\n\r\nThe expected value [is listed as](https://github.com/microformats/tests/blob/17d31dbeb3d64426d5a15548ea778f61df73c28f/tests/microformats-v2/h-card/impliedname.json#L75-L88):\r\n\r\n```json\r\n{\r\n  \"type\": [\"h-card\"],\r\n  \"properties\": {\r\n    \"name\": [\"Name\"]\r\n  },\r\n  \"children\": [{\r\n    \"value\": \"Name\",\r\n    \"type\": [\"h-card\"],\r\n    \"properties\": {\r\n      \"name\": [\"John Doe\"],\r\n      \"photo\": [\"http://example.com/john.html\"]\r\n    }\r\n  }]\r\n}\r\n```\r\n\r\nAccording to the test suite, the `<img>` in this example gets applied as a photo for the inner h-card, but \r\nnot for the outer h-card.  This does seem totally reasonable.  However, the [parsing spec](http://microformats.org/wiki/microformats2-parsing) contains the case for implied photos that reads:\r\n\r\n> else if .h-x>:only-child>img[src]:only-of-type:not[.h-\\*] then use that img src for photo\r\n\r\nwhich would actually apply to the outer h-card in this case.  Should this line of the spec (and similar selectors) read the following?\r\n\r\n> else if .h-x>:only-child**:not[.h-\\*]**>img[src]:only-of-type:not[.h-\\*] then use that img src for photo\r\n\r\n(note the addition of `:not[.h-*]` to the :only-child selector)\r\n\r\nFor comparison, most of the common libraries are interpreting the spec as written and applying the implied photo to both the outer and inner h-card.  The node library is behaving as I *think* the spec intended: http://willnorris.net/mf2compare/?url=https://willnorris.com/tmp/uf/impliedname-11.html"}}
{"actor":{"display_login":"willnorris"}}