{"action":"created","issue":{"url":"https://api.github.com/repos/nrc/rustfmt/issues/554","labels_url":"https://api.github.com/repos/nrc/rustfmt/issues/554/labels{/name}","comments_url":"https://api.github.com/repos/nrc/rustfmt/issues/554/comments","events_url":"https://api.github.com/repos/nrc/rustfmt/issues/554/events","html_url":"https://github.com/nrc/rustfmt/issues/554","id":114403124,"number":554,"title":"Messed up string inside code block in doc comment","user":{"login":"crumblingstatue","id":1521976,"avatar_url":"https://avatars.githubusercontent.com/u/1521976?v=3","gravatar_id":"","url":"https://api.github.com/users/crumblingstatue","html_url":"https://github.com/crumblingstatue","followers_url":"https://api.github.com/users/crumblingstatue/followers","following_url":"https://api.github.com/users/crumblingstatue/following{/other_user}","gists_url":"https://api.github.com/users/crumblingstatue/gists{/gist_id}","starred_url":"https://api.github.com/users/crumblingstatue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crumblingstatue/subscriptions","organizations_url":"https://api.github.com/users/crumblingstatue/orgs","repos_url":"https://api.github.com/users/crumblingstatue/repos","events_url":"https://api.github.com/users/crumblingstatue/events{/privacy}","received_events_url":"https://api.github.com/users/crumblingstatue/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nrc/rustfmt/labels/comments","name":"comments","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-31T10:49:49Z","updated_at":"2015-11-02T03:29:04Z","closed_at":null,"body":"```Diff\r\ndiff --git a/src/lib.rs b/src/lib.rs\r\nindex f07c890..5e5ab58 100644\r\n--- a/src/lib.rs\r\n+++ b/src/lib.rs\r\n@@ -1,12 +1,14 @@\r\n //! Library for manipulating Game Maker Studio's \"data.win\" (GEN8) data files.\r\n //!\r\n-//! Typical usage consists of reading [GameData](struct.GameData.html) from a file, doing stuff with it,\r\n+//! Typical usage consists of reading [GameData](struct.GameData.html) from a\r\n+//! file, doing stuff with it,\r\n //! then writing it back to a file.\r\n //!\r\n //! Example:\r\n //!\r\n //! ```no_run\r\n-//! let mut game_data = rgmk::GameData::from_file(\"data.win\").expect(\"Failed to open data.win\");\r\n+//! let mut game_data = rgmk::GameData::from_file(\"data.win\").expect(\"Failed to\r\n+//! open data.win\");\r\n //! game_data.strings.strings[0] = \"NYEH HEH HEH!\".into();\r\n //! game_data.save_to_file(\"data.win\").expect(\"Failed to save data.win\");\r\n //! ```\r\n```\r\n\r\nNow the generated documentation looks like this:\r\n![](http://i.imgur.com/rNfKDcF.png)"},"comment":{"url":"https://api.github.com/repos/nrc/rustfmt/issues/comments/152902442","html_url":"https://github.com/nrc/rustfmt/issues/554#issuecomment-152902442","issue_url":"https://api.github.com/repos/nrc/rustfmt/issues/554","id":152902442,"user":{"login":"nrc","id":762626,"avatar_url":"https://avatars.githubusercontent.com/u/762626?v=3","gravatar_id":"","url":"https://api.github.com/users/nrc","html_url":"https://github.com/nrc","followers_url":"https://api.github.com/users/nrc/followers","following_url":"https://api.github.com/users/nrc/following{/other_user}","gists_url":"https://api.github.com/users/nrc/gists{/gist_id}","starred_url":"https://api.github.com/users/nrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nrc/subscriptions","organizations_url":"https://api.github.com/users/nrc/orgs","repos_url":"https://api.github.com/users/nrc/repos","events_url":"https://api.github.com/users/nrc/events{/privacy}","received_events_url":"https://api.github.com/users/nrc/received_events","type":"User","site_admin":false},"created_at":"2015-11-02T03:29:04Z","updated_at":"2015-11-02T03:29:04Z","body":"Option 3 seems to be the right solution here, but it is also a bit hard - it would mean re-parsing and so forth. Not impossible, but certainly a bit of work.\r\n\r\nIn the short term, we could just detect and skip code blocks in comments. Perhaps we should have more fine-grained options for skipping doc comments too?"}}