{"action":"created","issue":{"url":"https://api.github.com/repos/cantino/huginn/issues/1231","labels_url":"https://api.github.com/repos/cantino/huginn/issues/1231/labels{/name}","comments_url":"https://api.github.com/repos/cantino/huginn/issues/1231/comments","events_url":"https://api.github.com/repos/cantino/huginn/issues/1231/events","html_url":"https://github.com/cantino/huginn/issues/1231","id":127098785,"number":1231,"title":"{% line_break %} appears not to work in Email Agent because line break character is ignored in HTML emails","user":{"login":"ohingardail","id":4740482,"avatar_url":"https://avatars.githubusercontent.com/u/4740482?v=3","gravatar_id":"","url":"https://api.github.com/users/ohingardail","html_url":"https://github.com/ohingardail","followers_url":"https://api.github.com/users/ohingardail/followers","following_url":"https://api.github.com/users/ohingardail/following{/other_user}","gists_url":"https://api.github.com/users/ohingardail/gists{/gist_id}","starred_url":"https://api.github.com/users/ohingardail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ohingardail/subscriptions","organizations_url":"https://api.github.com/users/ohingardail/orgs","repos_url":"https://api.github.com/users/ohingardail/repos","events_url":"https://api.github.com/users/ohingardail/events{/privacy}","received_events_url":"https://api.github.com/users/ohingardail/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-17T14:44:20Z","updated_at":"2016-01-21T18:31:05Z","closed_at":null,"body":"An Email Agent configured like this:\r\n```\r\n{\r\n  \"subject\": \"{{ title }}\",\r\n  \"expected_receive_period_in_days\": \"7\",\r\n  \"recipients\": \"xx@isp.com\",\r\n  \"body\": \"{{ description }} {% line_break %} {{ source_url }}\"\r\n}\r\n```\r\n... actually results an HTML email containing a line break character between {{ description }} and {{ source_url }}, which of course, is ignored when HTML is rendered, where a ```<br>``` is required instead.\r\n\r\nI am unclear whether the Email Agent is creating the HTML email or something downstream, but if HTML output is mandated by the Email Agent then {% line_break %} doesn't actually put a line break in (or rather it puts in the wrong one, if you see what I mean). \r\n\r\nThe workaround is to put a literal ```<br>``` in instead of {% line_break %}. \r\n\r\nThis might be more of a documentation issue; https://github.com/cantino/huginn/wiki/Formatting-Events-using-Liquid might need updating to clarify that {% line_break %} won't do what a user might expect of it in Email Agent (and any other agent emitting HTML, if any)."},"comment":{"url":"https://api.github.com/repos/cantino/huginn/issues/comments/173665773","html_url":"https://github.com/cantino/huginn/issues/1231#issuecomment-173665773","issue_url":"https://api.github.com/repos/cantino/huginn/issues/1231","id":173665773,"user":{"login":"cantino","id":83835,"avatar_url":"https://avatars.githubusercontent.com/u/83835?v=3","gravatar_id":"","url":"https://api.github.com/users/cantino","html_url":"https://github.com/cantino","followers_url":"https://api.github.com/users/cantino/followers","following_url":"https://api.github.com/users/cantino/following{/other_user}","gists_url":"https://api.github.com/users/cantino/gists{/gist_id}","starred_url":"https://api.github.com/users/cantino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cantino/subscriptions","organizations_url":"https://api.github.com/users/cantino/orgs","repos_url":"https://api.github.com/users/cantino/repos","events_url":"https://api.github.com/users/cantino/events{/privacy}","received_events_url":"https://api.github.com/users/cantino/received_events","type":"User","site_admin":false},"created_at":"2016-01-21T18:31:03Z","updated_at":"2016-01-21T18:31:03Z","body":"Right, it adds the line break character (\\n), not HTML. Is there somewhere\nthat we should update our docs?\nOn Thu, Jan 21, 2016 at 3:22 AM Adam Harrington <notifications@github.com>\nwrote:\n\n> @virtadpt <https://github.com/virtadpt> I've seen the effect in both\n> hotmail and gmail. @cantino <https://github.com/cantino> '\n> ', or variations such as those you suggested, work fine. This might be a\n> case of expectations management; I expected {% line_break %} to break a\n> line, and it doesn't always; it puts in '\\n' (I think) which is ignored in\n> HTML rendering.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/cantino/huginn/issues/1231#issuecomment-173542203>.\n>\n"}}