{"action":"created","issue":{"url":"https://api.github.com/repos/sparsetech/pine/issues/46","repository_url":"https://api.github.com/repos/sparsetech/pine","labels_url":"https://api.github.com/repos/sparsetech/pine/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/sparsetech/pine/issues/46/comments","events_url":"https://api.github.com/repos/sparsetech/pine/issues/46/events","html_url":"https://github.com/sparsetech/pine/issues/46","id":314024747,"number":46,"title":"`TagTokenListAttribute.state` duplicates attribute values","user":{"login":"erikvanoosten","id":630600,"avatar_url":"https://avatars3.githubusercontent.com/u/630600?v=4","gravatar_id":"","url":"https://api.github.com/users/erikvanoosten","html_url":"https://github.com/erikvanoosten","followers_url":"https://api.github.com/users/erikvanoosten/followers","following_url":"https://api.github.com/users/erikvanoosten/following{/other_user}","gists_url":"https://api.github.com/users/erikvanoosten/gists{/gist_id}","starred_url":"https://api.github.com/users/erikvanoosten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikvanoosten/subscriptions","organizations_url":"https://api.github.com/users/erikvanoosten/orgs","repos_url":"https://api.github.com/users/erikvanoosten/repos","events_url":"https://api.github.com/users/erikvanoosten/events{/privacy}","received_events_url":"https://api.github.com/users/erikvanoosten/received_events","type":"User","site_admin":false},"labels":[{"id":242860816,"url":"https://api.github.com/repos/sparsetech/pine/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/sparsetech/pine/milestones/3","html_url":"https://github.com/sparsetech/pine/milestone/3","labels_url":"https://api.github.com/repos/sparsetech/pine/milestones/3/labels","id":3194697,"number":3,"title":"v0.2","description":"","creator":{"login":"tindzk","id":196819,"avatar_url":"https://avatars2.githubusercontent.com/u/196819?v=4","gravatar_id":"","url":"https://api.github.com/users/tindzk","html_url":"https://github.com/tindzk","followers_url":"https://api.github.com/users/tindzk/followers","following_url":"https://api.github.com/users/tindzk/following{/other_user}","gists_url":"https://api.github.com/users/tindzk/gists{/gist_id}","starred_url":"https://api.github.com/users/tindzk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tindzk/subscriptions","organizations_url":"https://api.github.com/users/tindzk/orgs","repos_url":"https://api.github.com/users/tindzk/repos","events_url":"https://api.github.com/users/tindzk/events{/privacy}","received_events_url":"https://api.github.com/users/tindzk/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":0,"state":"open","created_at":"2018-03-17T01:24:21Z","updated_at":"2018-04-16T15:26:13Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2018-04-13T09:01:18Z","updated_at":"2018-04-16T15:34:21Z","closed_at":null,"author_association":"NONE","body":"Say we have the following template (`d-none` is a Bootstrap class to hide something):\r\n  `html\"\"\"<span id=\"err\" class=\"d-none\">Error message</span>\"\"\"`\r\n\r\nNow the following code:\r\n```\r\nTagRef[tag.Span](\"err\").`state`.(true, \"d-none\")\r\n```\r\n\r\nResults in the following html: `<span id=\"err\" class=\"d-none d-none\">Error message</span>`\r\n\r\nA following invocation to `state` with `false` will only remove the first `d-none` (`List.diff` in method `remove` only removes the first occurrence).\r\n\r\nIt is not clear to me if `TagTokenListAttribute` needs to support duplicate values. For the `class` attribute this is clearly not desirable but there might be other use cases I am not aware off."},"comment":{"url":"https://api.github.com/repos/sparsetech/pine/issues/comments/381647697","html_url":"https://github.com/sparsetech/pine/issues/46#issuecomment-381647697","issue_url":"https://api.github.com/repos/sparsetech/pine/issues/46","id":381647697,"user":{"login":"tindzk","id":196819,"avatar_url":"https://avatars2.githubusercontent.com/u/196819?v=4","gravatar_id":"","url":"https://api.github.com/users/tindzk","html_url":"https://github.com/tindzk","followers_url":"https://api.github.com/users/tindzk/followers","following_url":"https://api.github.com/users/tindzk/following{/other_user}","gists_url":"https://api.github.com/users/tindzk/gists{/gist_id}","starred_url":"https://api.github.com/users/tindzk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tindzk/subscriptions","organizations_url":"https://api.github.com/users/tindzk/orgs","repos_url":"https://api.github.com/users/tindzk/repos","events_url":"https://api.github.com/users/tindzk/events{/privacy}","received_events_url":"https://api.github.com/users/tindzk/received_events","type":"User","site_admin":false},"created_at":"2018-04-16T15:34:21Z","updated_at":"2018-04-16T15:34:21Z","author_association":"CONTRIBUTOR","body":"Thanks for pointing this out! This is a regression from the latest release.\r\n\r\nAccording to the [specification](https://html.spec.whatwg.org/#space-separated-tokens), there are \"space-separated tokens\" and \"comma-separated tokens\", both of which are defined as sets.\r\n\r\nTherefore, it would make sense to change `TagTokenListAttribute` to `TagTokenSetAttribute`."}}
{"actor":{"display_login":"tindzk"}}