{"action":"closed","number":933,"pull_request":{"url":"https://api.github.com/repos/haml/haml/pulls/933","id":122273152,"html_url":"https://github.com/haml/haml/pull/933","diff_url":"https://github.com/haml/haml/pull/933.diff","patch_url":"https://github.com/haml/haml/pull/933.patch","issue_url":"https://api.github.com/repos/haml/haml/issues/933","number":933,"state":"closed","locked":false,"title":"Fix list_of helper with multi-line content","user":{"login":"zetaben","id":73409,"avatar_url":"https://avatars1.githubusercontent.com/u/73409?v=3","gravatar_id":"","url":"https://api.github.com/users/zetaben","html_url":"https://github.com/zetaben","followers_url":"https://api.github.com/users/zetaben/followers","following_url":"https://api.github.com/users/zetaben/following{/other_user}","gists_url":"https://api.github.com/users/zetaben/gists{/gist_id}","starred_url":"https://api.github.com/users/zetaben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zetaben/subscriptions","organizations_url":"https://api.github.com/users/zetaben/orgs","repos_url":"https://api.github.com/users/zetaben/repos","events_url":"https://api.github.com/users/zetaben/events{/privacy}","received_events_url":"https://api.github.com/users/zetaben/received_events","type":"User","site_admin":false},"body":"Hello,\r\n\r\nThe current `list_of` helper in haml 5.0.1 seem to have an issue when running in rails (at least in 5.0.0.1) when inserting multi-line content. \r\n\r\nIn my rails app when I do a block `link_to` in the `list_of`, the content of the list is removed:\r\n```\r\n= list_of array do |type|               \r\n  = link_to helper_url(type) do            \r\n    = myhellper(type)                                         \r\n    = type.humanize \r\n```\r\n\r\nIt seem to be linked to the use of `strip!` instead of `strip` the `!` version will actually return [nil if does nothing](https://ruby-doc.org/core-2.2.0/String.html#method-i-strip-21).\r\n\r\nI managed to add a test that seem to replicate the issue without rails. It could also probably be fixed using an `result.strip! || result` which would not copy `result`.\r\n\r\nThanks again for HAML and saving me from ERB !","created_at":"2017-05-24T16:39:44Z","updated_at":"2017-05-25T12:00:30Z","closed_at":"2017-05-25T12:00:30Z","merged_at":"2017-05-25T12:00:30Z","merge_commit_sha":"b61c6bc2c53e8a5d3c11e2d76c7cfde75cf941ab","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/haml/haml/pulls/933/commits","review_comments_url":"https://api.github.com/repos/haml/haml/pulls/933/comments","review_comment_url":"https://api.github.com/repos/haml/haml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/haml/haml/issues/933/comments","statuses_url":"https://api.github.com/repos/haml/haml/statuses/5e9be5e3c162027825cfed4d48f19b67b61c3e7d","head":{"label":"zetaben:listof-strip","ref":"listof-strip","sha":"5e9be5e3c162027825cfed4d48f19b67b61c3e7d","user":{"login":"zetaben","id":73409,"avatar_url":"https://avatars1.githubusercontent.com/u/73409?v=3","gravatar_id":"","url":"https://api.github.com/users/zetaben","html_url":"https://github.com/zetaben","followers_url":"https://api.github.com/users/zetaben/followers","following_url":"https://api.github.com/users/zetaben/following{/other_user}","gists_url":"https://api.github.com/users/zetaben/gists{/gist_id}","starred_url":"https://api.github.com/users/zetaben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zetaben/subscriptions","organizations_url":"https://api.github.com/users/zetaben/orgs","repos_url":"https://api.github.com/users/zetaben/repos","events_url":"https://api.github.com/users/zetaben/events{/privacy}","received_events_url":"https://api.github.com/users/zetaben/received_events","type":"User","site_admin":false},"repo":{"id":92312494,"name":"haml","full_name":"zetaben/haml","owner":{"login":"zetaben","id":73409,"avatar_url":"https://avatars1.githubusercontent.com/u/73409?v=3","gravatar_id":"","url":"https://api.github.com/users/zetaben","html_url":"https://github.com/zetaben","followers_url":"https://api.github.com/users/zetaben/followers","following_url":"https://api.github.com/users/zetaben/following{/other_user}","gists_url":"https://api.github.com/users/zetaben/gists{/gist_id}","starred_url":"https://api.github.com/users/zetaben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zetaben/subscriptions","organizations_url":"https://api.github.com/users/zetaben/orgs","repos_url":"https://api.github.com/users/zetaben/repos","events_url":"https://api.github.com/users/zetaben/events{/privacy}","received_events_url":"https://api.github.com/users/zetaben/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zetaben/haml","description":"HTML Abstraction Markup Language - A Markup Haiku","fork":true,"url":"https://api.github.com/repos/zetaben/haml","forks_url":"https://api.github.com/repos/zetaben/haml/forks","keys_url":"https://api.github.com/repos/zetaben/haml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zetaben/haml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zetaben/haml/teams","hooks_url":"https://api.github.com/repos/zetaben/haml/hooks","issue_events_url":"https://api.github.com/repos/zetaben/haml/issues/events{/number}","events_url":"https://api.github.com/repos/zetaben/haml/events","assignees_url":"https://api.github.com/repos/zetaben/haml/assignees{/user}","branches_url":"https://api.github.com/repos/zetaben/haml/branches{/branch}","tags_url":"https://api.github.com/repos/zetaben/haml/tags","blobs_url":"https://api.github.com/repos/zetaben/haml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zetaben/haml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zetaben/haml/git/refs{/sha}","trees_url":"https://api.github.com/repos/zetaben/haml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zetaben/haml/statuses/{sha}","languages_url":"https://api.github.com/repos/zetaben/haml/languages","stargazers_url":"https://api.github.com/repos/zetaben/haml/stargazers","contributors_url":"https://api.github.com/repos/zetaben/haml/contributors","subscribers_url":"https://api.github.com/repos/zetaben/haml/subscribers","subscription_url":"https://api.github.com/repos/zetaben/haml/subscription","commits_url":"https://api.github.com/repos/zetaben/haml/commits{/sha}","git_commits_url":"https://api.github.com/repos/zetaben/haml/git/commits{/sha}","comments_url":"https://api.github.com/repos/zetaben/haml/comments{/number}","issue_comment_url":"https://api.github.com/repos/zetaben/haml/issues/comments{/number}","contents_url":"https://api.github.com/repos/zetaben/haml/contents/{+path}","compare_url":"https://api.github.com/repos/zetaben/haml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zetaben/haml/merges","archive_url":"https://api.github.com/repos/zetaben/haml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zetaben/haml/downloads","issues_url":"https://api.github.com/repos/zetaben/haml/issues{/number}","pulls_url":"https://api.github.com/repos/zetaben/haml/pulls{/number}","milestones_url":"https://api.github.com/repos/zetaben/haml/milestones{/number}","notifications_url":"https://api.github.com/repos/zetaben/haml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zetaben/haml/labels{/name}","releases_url":"https://api.github.com/repos/zetaben/haml/releases{/id}","deployments_url":"https://api.github.com/repos/zetaben/haml/deployments","created_at":"2017-05-24T16:17:37Z","updated_at":"2017-05-24T16:17:39Z","pushed_at":"2017-05-24T16:25:01Z","git_url":"git://github.com/zetaben/haml.git","ssh_url":"git@github.com:zetaben/haml.git","clone_url":"https://github.com/zetaben/haml.git","svn_url":"https://github.com/zetaben/haml","homepage":"http://haml.info","size":8108,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"haml:master","ref":"master","sha":"47d88fc4d7e6e413a7d764b9a0ccffec7b95da22","user":{"login":"haml","id":1686160,"avatar_url":"https://avatars1.githubusercontent.com/u/1686160?v=3","gravatar_id":"","url":"https://api.github.com/users/haml","html_url":"https://github.com/haml","followers_url":"https://api.github.com/users/haml/followers","following_url":"https://api.github.com/users/haml/following{/other_user}","gists_url":"https://api.github.com/users/haml/gists{/gist_id}","starred_url":"https://api.github.com/users/haml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haml/subscriptions","organizations_url":"https://api.github.com/users/haml/orgs","repos_url":"https://api.github.com/users/haml/repos","events_url":"https://api.github.com/users/haml/events{/privacy}","received_events_url":"https://api.github.com/users/haml/received_events","type":"Organization","site_admin":false},"repo":{"id":426,"name":"haml","full_name":"haml/haml","owner":{"login":"haml","id":1686160,"avatar_url":"https://avatars1.githubusercontent.com/u/1686160?v=3","gravatar_id":"","url":"https://api.github.com/users/haml","html_url":"https://github.com/haml","followers_url":"https://api.github.com/users/haml/followers","following_url":"https://api.github.com/users/haml/following{/other_user}","gists_url":"https://api.github.com/users/haml/gists{/gist_id}","starred_url":"https://api.github.com/users/haml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haml/subscriptions","organizations_url":"https://api.github.com/users/haml/orgs","repos_url":"https://api.github.com/users/haml/repos","events_url":"https://api.github.com/users/haml/events{/privacy}","received_events_url":"https://api.github.com/users/haml/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/haml/haml","description":"HTML Abstraction Markup Language - A Markup Haiku","fork":false,"url":"https://api.github.com/repos/haml/haml","forks_url":"https://api.github.com/repos/haml/haml/forks","keys_url":"https://api.github.com/repos/haml/haml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/haml/haml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/haml/haml/teams","hooks_url":"https://api.github.com/repos/haml/haml/hooks","issue_events_url":"https://api.github.com/repos/haml/haml/issues/events{/number}","events_url":"https://api.github.com/repos/haml/haml/events","assignees_url":"https://api.github.com/repos/haml/haml/assignees{/user}","branches_url":"https://api.github.com/repos/haml/haml/branches{/branch}","tags_url":"https://api.github.com/repos/haml/haml/tags","blobs_url":"https://api.github.com/repos/haml/haml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/haml/haml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/haml/haml/git/refs{/sha}","trees_url":"https://api.github.com/repos/haml/haml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/haml/haml/statuses/{sha}","languages_url":"https://api.github.com/repos/haml/haml/languages","stargazers_url":"https://api.github.com/repos/haml/haml/stargazers","contributors_url":"https://api.github.com/repos/haml/haml/contributors","subscribers_url":"https://api.github.com/repos/haml/haml/subscribers","subscription_url":"https://api.github.com/repos/haml/haml/subscription","commits_url":"https://api.github.com/repos/haml/haml/commits{/sha}","git_commits_url":"https://api.github.com/repos/haml/haml/git/commits{/sha}","comments_url":"https://api.github.com/repos/haml/haml/comments{/number}","issue_comment_url":"https://api.github.com/repos/haml/haml/issues/comments{/number}","contents_url":"https://api.github.com/repos/haml/haml/contents/{+path}","compare_url":"https://api.github.com/repos/haml/haml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/haml/haml/merges","archive_url":"https://api.github.com/repos/haml/haml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/haml/haml/downloads","issues_url":"https://api.github.com/repos/haml/haml/issues{/number}","pulls_url":"https://api.github.com/repos/haml/haml/pulls{/number}","milestones_url":"https://api.github.com/repos/haml/haml/milestones{/number}","notifications_url":"https://api.github.com/repos/haml/haml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/haml/haml/labels{/name}","releases_url":"https://api.github.com/repos/haml/haml/releases{/id}","deployments_url":"https://api.github.com/repos/haml/haml/deployments","created_at":"2008-02-11T22:55:26Z","updated_at":"2017-05-21T15:25:31Z","pushed_at":"2017-05-25T12:00:30Z","git_url":"git://github.com/haml/haml.git","ssh_url":"git@github.com:haml/haml.git","clone_url":"https://github.com/haml/haml.git","svn_url":"https://github.com/haml/haml","homepage":"http://haml.info","size":8107,"stargazers_count":3157,"watchers_count":3157,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":516,"mirror_url":null,"open_issues_count":17,"forks":516,"open_issues":17,"watchers":3157,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/haml/haml/pulls/933"},"html":{"href":"https://github.com/haml/haml/pull/933"},"issue":{"href":"https://api.github.com/repos/haml/haml/issues/933"},"comments":{"href":"https://api.github.com/repos/haml/haml/issues/933/comments"},"review_comments":{"href":"https://api.github.com/repos/haml/haml/pulls/933/comments"},"review_comment":{"href":"https://api.github.com/repos/haml/haml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/haml/haml/pulls/933/commits"},"statuses":{"href":"https://api.github.com/repos/haml/haml/statuses/5e9be5e3c162027825cfed4d48f19b67b61c3e7d"}},"merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"k0kubun","id":3138447,"avatar_url":"https://avatars2.githubusercontent.com/u/3138447?v=3","gravatar_id":"","url":"https://api.github.com/users/k0kubun","html_url":"https://github.com/k0kubun","followers_url":"https://api.github.com/users/k0kubun/followers","following_url":"https://api.github.com/users/k0kubun/following{/other_user}","gists_url":"https://api.github.com/users/k0kubun/gists{/gist_id}","starred_url":"https://api.github.com/users/k0kubun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k0kubun/subscriptions","organizations_url":"https://api.github.com/users/k0kubun/orgs","repos_url":"https://api.github.com/users/k0kubun/repos","events_url":"https://api.github.com/users/k0kubun/events{/privacy}","received_events_url":"https://api.github.com/users/k0kubun/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":3,"deletions":1,"changed_files":2}}
{"actor":{"display_login":"k0kubun"}}