{"action":"created","issue":{"url":"https://api.github.com/repos/rockneurotiko/ex_gram/issues/37","repository_url":"https://api.github.com/repos/rockneurotiko/ex_gram","labels_url":"https://api.github.com/repos/rockneurotiko/ex_gram/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/rockneurotiko/ex_gram/issues/37/comments","events_url":"https://api.github.com/repos/rockneurotiko/ex_gram/issues/37/events","html_url":"https://github.com/rockneurotiko/ex_gram/issues/37","id":506087455,"node_id":"MDU6SXNzdWU1MDYwODc0NTU=","number":37,"title":"[Regex] Problems compiling project when using regexes","user":{"login":"thehabbos007","id":6988668,"node_id":"MDQ6VXNlcjY5ODg2Njg=","avatar_url":"https://avatars1.githubusercontent.com/u/6988668?v=4","gravatar_id":"","url":"https://api.github.com/users/thehabbos007","html_url":"https://github.com/thehabbos007","followers_url":"https://api.github.com/users/thehabbos007/followers","following_url":"https://api.github.com/users/thehabbos007/following{/other_user}","gists_url":"https://api.github.com/users/thehabbos007/gists{/gist_id}","starred_url":"https://api.github.com/users/thehabbos007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehabbos007/subscriptions","organizations_url":"https://api.github.com/users/thehabbos007/orgs","repos_url":"https://api.github.com/users/thehabbos007/repos","events_url":"https://api.github.com/users/thehabbos007/events{/privacy}","received_events_url":"https://api.github.com/users/thehabbos007/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-10-11T22:49:12Z","updated_at":"2019-10-12T14:52:58Z","closed_at":"2019-10-12T14:51:47Z","author_association":"CONTRIBUTOR","body":"This was on 0.8\r\nI was trying to see if i could make regexes work, when compiling my bot with `regex(\"test\", :test)` in the module, I the following error\r\n```\r\n** (CompileError) lib/bot/bot.ex: invalid quoted expression: ~r/test/\r\n\r\nPlease make sure your quoted expressions are made of valid AST nodes. If you would like to introduce a value into the AST, such as a four-element tuple or a map, make sure to call Macro.escape/1 before\r\n    (stdlib) lists.erl:1354: :lists.mapfoldl/3\r\n    (stdlib) lists.erl:1355: :lists.mapfoldl/3\r\n    /mnt/c/Users/Ahmad/Desktop/dev/playground/bot/lib/bot/bot.ex:1: ExGram.Middleware.Builder.__before_compile__/1\r\n```\r\n\r\nCalling `Macro.escape` on the `Regex.compile!` function in https://github.com/rockneurotiko/ex_gram/blob/9b9371a4927e22bc2e9201eb9041ee0a81b55bd3/lib/ex_gram/middleware/builder.ex#L31 seemed to fix this.\r\n\r\nI'll gladly make a PR and update some of the readme for regexes if this change won't break anything 😄 "},"comment":{"url":"https://api.github.com/repos/rockneurotiko/ex_gram/issues/comments/541331864","html_url":"https://github.com/rockneurotiko/ex_gram/issues/37#issuecomment-541331864","issue_url":"https://api.github.com/repos/rockneurotiko/ex_gram/issues/37","id":541331864,"node_id":"MDEyOklzc3VlQ29tbWVudDU0MTMzMTg2NA==","user":{"login":"rockneurotiko","id":1377584,"node_id":"MDQ6VXNlcjEzNzc1ODQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1377584?v=4","gravatar_id":"","url":"https://api.github.com/users/rockneurotiko","html_url":"https://github.com/rockneurotiko","followers_url":"https://api.github.com/users/rockneurotiko/followers","following_url":"https://api.github.com/users/rockneurotiko/following{/other_user}","gists_url":"https://api.github.com/users/rockneurotiko/gists{/gist_id}","starred_url":"https://api.github.com/users/rockneurotiko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rockneurotiko/subscriptions","organizations_url":"https://api.github.com/users/rockneurotiko/orgs","repos_url":"https://api.github.com/users/rockneurotiko/repos","events_url":"https://api.github.com/users/rockneurotiko/events{/privacy}","received_events_url":"https://api.github.com/users/rockneurotiko/received_events","type":"User","site_admin":false},"created_at":"2019-10-12T14:52:58Z","updated_at":"2019-10-12T14:52:58Z","author_association":"OWNER","body":"I will add this to the release 0.8.1, I'll release it as soon as we merge #39 "}}
{"actor":{"display_login":"rockneurotiko"}}