{"action":"created","issue":{"url":"https://api.github.com/repos/optonaut/ActiveLabel.swift/issues/128","repository_url":"https://api.github.com/repos/optonaut/ActiveLabel.swift","labels_url":"https://api.github.com/repos/optonaut/ActiveLabel.swift/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/optonaut/ActiveLabel.swift/issues/128/comments","events_url":"https://api.github.com/repos/optonaut/ActiveLabel.swift/issues/128/events","html_url":"https://github.com/optonaut/ActiveLabel.swift/pull/128","id":184975580,"number":128,"title":"Opened up a function configureLinkAttribute to allow fully customizable NSAttributedString","user":{"login":"joshdholtz","id":401294,"avatar_url":"https://avatars.githubusercontent.com/u/401294?v=3","gravatar_id":"","url":"https://api.github.com/users/joshdholtz","html_url":"https://github.com/joshdholtz","followers_url":"https://api.github.com/users/joshdholtz/followers","following_url":"https://api.github.com/users/joshdholtz/following{/other_user}","gists_url":"https://api.github.com/users/joshdholtz/gists{/gist_id}","starred_url":"https://api.github.com/users/joshdholtz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshdholtz/subscriptions","organizations_url":"https://api.github.com/users/joshdholtz/orgs","repos_url":"https://api.github.com/users/joshdholtz/repos","events_url":"https://api.github.com/users/joshdholtz/events{/privacy}","received_events_url":"https://api.github.com/users/joshdholtz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-10-24T22:52:57Z","updated_at":"2016-10-25T17:26:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/optonaut/ActiveLabel.swift/pulls/128","html_url":"https://github.com/optonaut/ActiveLabel.swift/pull/128","diff_url":"https://github.com/optonaut/ActiveLabel.swift/pull/128.diff","patch_url":"https://github.com/optonaut/ActiveLabel.swift/pull/128.patch"},"body":"Allows full customization of `customTap` by opening up the `NSAttributedString` configuration in a callback\r\n\r\nI, personally, needed this to bold the username at the start of a comment label and this seemed like the best, easiest, and most flexible solution\r\n\r\nSomewhat helps #97 and #118 \r\n\r\nExample below simply sets the username at the beginning of the label to a bold system font of size 14\r\n```swift\r\nlet customType = ActiveType.custom(pattern: \"^\\(username)\\\\b\")\r\nlblComment.enabledTypes = [.mention, .hashtag, .url, customType]\r\n\r\nlblComment.configureLinkAttribute = { (type, attributes, isSelected) in\r\n\tvar atts = attributes\r\n\tswitch type {\r\n\tcase .custom:\r\n\t\tatts[NSFontAttributeName] = isSelected ? UIFont.boldSystemFontOfSize(16) : UIFont.boldSystemFontOfSize(14)\r\n\tdefault: ()\r\n\t}\r\n\t\r\n\treturn atts\r\n}\r\n\r\nlblComment.handleCustomTap(for: customType) { element in\r\n\tprint(\"Custom type tapped: \\(element)\")\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/optonaut/ActiveLabel.swift/issues/comments/256102631","html_url":"https://github.com/optonaut/ActiveLabel.swift/pull/128#issuecomment-256102631","issue_url":"https://api.github.com/repos/optonaut/ActiveLabel.swift/issues/128","id":256102631,"user":{"login":"poolqf","id":7887319,"avatar_url":"https://avatars.githubusercontent.com/u/7887319?v=3","gravatar_id":"","url":"https://api.github.com/users/poolqf","html_url":"https://github.com/poolqf","followers_url":"https://api.github.com/users/poolqf/followers","following_url":"https://api.github.com/users/poolqf/following{/other_user}","gists_url":"https://api.github.com/users/poolqf/gists{/gist_id}","starred_url":"https://api.github.com/users/poolqf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poolqf/subscriptions","organizations_url":"https://api.github.com/users/poolqf/orgs","repos_url":"https://api.github.com/users/poolqf/repos","events_url":"https://api.github.com/users/poolqf/events{/privacy}","received_events_url":"https://api.github.com/users/poolqf/received_events","type":"User","site_admin":false},"created_at":"2016-10-25T17:26:04Z","updated_at":"2016-10-25T17:26:04Z","body":"Btw, just seen there's a conflict caused by a recent merge I've done... Sorry! \r\nShould be pretty easy to fix"}}
{"actor":{"display_login":"poolqf"}}