{"action":"created","issue":{"url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/2029","labels_url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/2029/labels{/name}","comments_url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/2029/comments","events_url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/2029/events","html_url":"https://github.com/sphinx-doc/sphinx/issues/2029","id":105318271,"number":2029,"title":"ROI: strip lines in literalinclude","user":{"login":"andreacassioli","id":6704112,"avatar_url":"https://avatars.githubusercontent.com/u/6704112?v=3","gravatar_id":"","url":"https://api.github.com/users/andreacassioli","html_url":"https://github.com/andreacassioli","followers_url":"https://api.github.com/users/andreacassioli/followers","following_url":"https://api.github.com/users/andreacassioli/following{/other_user}","gists_url":"https://api.github.com/users/andreacassioli/gists{/gist_id}","starred_url":"https://api.github.com/users/andreacassioli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreacassioli/subscriptions","organizations_url":"https://api.github.com/users/andreacassioli/orgs","repos_url":"https://api.github.com/users/andreacassioli/repos","events_url":"https://api.github.com/users/andreacassioli/events{/privacy}","received_events_url":"https://api.github.com/users/andreacassioli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-08T07:29:58Z","updated_at":"2015-09-28T13:17:12Z","closed_at":null,"body":"Hi,\r\nI have greatly appreciated the improvements in `code-block` and `literalinclude`. I think there is still a functionality that would be nice to add.\r\n\r\nI think that it should be given an option to strip out lines containing a given string, pretty much the `:start-after` option does. It would allow for instance to remove special comments we do not want to enter the docs. \r\n\r\nMy use case is the following: I extract code snippet form an example and some are nested in others, as\r\n\r\n```\r\n#snippet 1 begins\r\n...\r\n#snippet 2 begins\r\n...\r\n#snippet 2 ends\r\n...\r\n#snippet 1 ends\r\n```\r\n\r\nIdeally I would like to show snippet 2 to explain something specific, and then snippet 1 for the whole code. I think relying on code line is a fragile approach.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/comments/143740873","html_url":"https://github.com/sphinx-doc/sphinx/issues/2029#issuecomment-143740873","issue_url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/2029","id":143740873,"user":{"login":"andreacassioli","id":6704112,"avatar_url":"https://avatars.githubusercontent.com/u/6704112?v=3","gravatar_id":"","url":"https://api.github.com/users/andreacassioli","html_url":"https://github.com/andreacassioli","followers_url":"https://api.github.com/users/andreacassioli/followers","following_url":"https://api.github.com/users/andreacassioli/following{/other_user}","gists_url":"https://api.github.com/users/andreacassioli/gists{/gist_id}","starred_url":"https://api.github.com/users/andreacassioli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreacassioli/subscriptions","organizations_url":"https://api.github.com/users/andreacassioli/orgs","repos_url":"https://api.github.com/users/andreacassioli/repos","events_url":"https://api.github.com/users/andreacassioli/events{/privacy}","received_events_url":"https://api.github.com/users/andreacassioli/received_events","type":"User","site_admin":false},"created_at":"2015-09-28T13:17:12Z","updated_at":"2015-09-28T13:17:12Z","body":"I am surprise nobody commented. \r\n\r\nI think this is a quite general feature. For instance one may have\r\n\r\n* comments that do not want to show\r\n* remove empty  lines\r\n\r\nA simple final strip would be very handy."}}