{"issue":{"user":{"id":50812,"login":"pbrisbin","url":"https://api.github.com/users/pbrisbin","avatar_url":"https://secure.gravatar.com/avatar/2be502055b6c21ff470730beead2a998?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"2be502055b6c21ff470730beead2a998"},"title":"compile time exception with script content","milestone":null,"created_at":"2011-12-21T04:03:40Z","labels":[],"state":"open","updated_at":"2011-12-21T06:22:46Z","id":2621454,"html_url":"https://github.com/yesodweb/hamlet/issues/30","closed_at":null,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"A very recent update caused this:\r\n\r\n``` \r\n <script>\r\n     $(function() {\r\n       $(\".accordion\").accordion({\r\n         collapsible: true,\r\n         autoHeight:  false,                                                                                                                                                                                                                                                                                                \r\n         active:      false\r\n       });\r\n    });\r\n```\r\n\r\nto all of sudden throw an \"exception trying to run compile-time code...\".\r\n\r\nChanging to this:\r\n\r\n```\r\n  <script>\r\n    \\ $(function() {\r\n    \\   $(\".accordion\").accordion({\r\n    \\     collapsible: true,\r\n    \\     autoHeight:  false,                                                                                                                                                                                                                                                                                                \r\n    \\     active:      false\r\n    \\   });\r\n    \\ });\r\n```\r\n\r\ngot it working, but I'd prefer to not need the extra escaping.\r\n\r\nAny ideas why?","number":30,"url":"https://api.github.com/repos/yesodweb/hamlet/issues/30","comments":1,"assignee":null},"comment":{"user":{"id":49415,"login":"snoyberg","url":"https://api.github.com/users/snoyberg","avatar_url":"https://secure.gravatar.com/avatar/71596bb1ca3ba3aa4400c3f407baec9f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"71596bb1ca3ba3aa4400c3f407baec9f"},"created_at":"2011-12-21T06:22:46Z","updated_at":"2011-12-21T06:22:46Z","id":3230185,"body":"This was a new feature request someone put in: flag all inappropriate commands as errors, to prevent typos like `$for all`. When I run your code, I get the more descriptive error message:\r\n\r\n\r\n> Received a command I did not understand. If you wanted a literal $, start the line with a backslash.\r\n>       Code: Language.Haskell.TH.Quote.quoteExp\r\n>               shamlet\r\n>               \"\\r\\n<script>\\r\\n     $(function() {\\r\\n       $(\\\".accordion\\\").accordion({\\r\\n         collapsible: true,\\r\\n\r\n>   autoHeight:  false,\\r\\n         active:      false\\r\\n       });\\r\\n    });\\r\\n\\r\\n\"\r\n\r\nHaving this feature also allows us to add new commands in the future without worries of breaking people's code.","url":"https://api.github.com/repos/yesodweb/hamlet/issues/comments/3230185"},"action":"created"}