{"action":"created","issue":{"url":"https://api.github.com/repos/bem/bem-xjst/issues/89","labels_url":"https://api.github.com/repos/bem/bem-xjst/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/bem/bem-xjst/issues/89/comments","events_url":"https://api.github.com/repos/bem/bem-xjst/issues/89/events","html_url":"https://github.com/bem/bem-xjst/issues/89","id":99806554,"number":89,"title":"elemMatch changes in bem-xjst > 1.x","user":{"login":"tadatuta","id":475746,"avatar_url":"https://avatars.githubusercontent.com/u/475746?v=3","gravatar_id":"","url":"https://api.github.com/users/tadatuta","html_url":"https://github.com/tadatuta","followers_url":"https://api.github.com/users/tadatuta/followers","following_url":"https://api.github.com/users/tadatuta/following{/other_user}","gists_url":"https://api.github.com/users/tadatuta/gists{/gist_id}","starred_url":"https://api.github.com/users/tadatuta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tadatuta/subscriptions","organizations_url":"https://api.github.com/users/tadatuta/orgs","repos_url":"https://api.github.com/users/tadatuta/repos","events_url":"https://api.github.com/users/tadatuta/events{/privacy}","received_events_url":"https://api.github.com/users/tadatuta/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bem/bem-xjst/labels/docs","name":"docs","color":"bfe5bf"},{"url":"https://api.github.com/repos/bem/bem-xjst/labels/v%20next-gen","name":"v next-gen","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-08T14:48:14Z","updated_at":"2015-12-02T15:18:56Z","closed_at":null,"body":"With `bem-xjst@1.x` it's possible to write match like this:\r\n```js\r\n    elemMatch(function() {\r\n        return this.elem === 'layout-unit' || this.elem === 'separator' || this.elem === 'gap';\r\n    }).tag()('td')\r\n```\r\nwhis is the same as\r\n```js\r\n    elem('layout').tag()('table'),\r\n    elem('layout-row').tag()('tr'),\r\n    elem('layout-unit').tag()('td'),\r\n    elem('separator').tag()('td'),\r\n    elem('gap').tag()('td')\r\n```\r\n\r\nSince `bem-xjst@2.x` only second variant works.\r\n\r\nI'm not sure it it's something worth fixing but JFYI."},"comment":{"url":"https://api.github.com/repos/bem/bem-xjst/issues/comments/161329735","html_url":"https://github.com/bem/bem-xjst/issues/89#issuecomment-161329735","issue_url":"https://api.github.com/repos/bem/bem-xjst/issues/89","id":161329735,"user":{"login":"zxqfox","id":677518,"avatar_url":"https://avatars.githubusercontent.com/u/677518?v=3","gravatar_id":"","url":"https://api.github.com/users/zxqfox","html_url":"https://github.com/zxqfox","followers_url":"https://api.github.com/users/zxqfox/followers","following_url":"https://api.github.com/users/zxqfox/following{/other_user}","gists_url":"https://api.github.com/users/zxqfox/gists{/gist_id}","starred_url":"https://api.github.com/users/zxqfox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zxqfox/subscriptions","organizations_url":"https://api.github.com/users/zxqfox/orgs","repos_url":"https://api.github.com/users/zxqfox/repos","events_url":"https://api.github.com/users/zxqfox/events{/privacy}","received_events_url":"https://api.github.com/users/zxqfox/received_events","type":"User","site_admin":false},"created_at":"2015-12-02T15:18:56Z","updated_at":"2015-12-02T15:18:56Z","body":"```\r\nblock('snippet2').elemMatch(function() {\r\n    return this.elem === 'title' || this.elem === 'link';\r\n})\r\n// ===\r\nblock('snippet2').elem('*').match(function() {\r\n    return this.elem === 'title' || this.elem === 'link';\r\n})\r\n```"}}