{"action":"closed","issue":{"url":"https://api.github.com/repos/sphinx-doc/testing2/issues/78","labels_url":"https://api.github.com/repos/sphinx-doc/testing2/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/sphinx-doc/testing2/issues/78/comments","events_url":"https://api.github.com/repos/sphinx-doc/testing2/issues/78/events","html_url":"https://github.com/sphinx-doc/testing2/issues/78","id":53250988,"number":78,"title":"Add start-after and end-before fields to literalinclude","user":{"login":"shimizukawa","id":151623,"avatar_url":"https://avatars.githubusercontent.com/u/151623?v=3","gravatar_id":"","url":"https://api.github.com/users/shimizukawa","html_url":"https://github.com/shimizukawa","followers_url":"https://api.github.com/users/shimizukawa/followers","following_url":"https://api.github.com/users/shimizukawa/following{/other_user}","gists_url":"https://api.github.com/users/shimizukawa/gists{/gist_id}","starred_url":"https://api.github.com/users/shimizukawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shimizukawa/subscriptions","organizations_url":"https://api.github.com/users/shimizukawa/orgs","repos_url":"https://api.github.com/users/shimizukawa/repos","events_url":"https://api.github.com/users/shimizukawa/events{/privacy}","received_events_url":"https://api.github.com/users/shimizukawa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sphinx-doc/testing2/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/sphinx-doc/testing2/labels/markup","name":"markup","color":"FFFFFF"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-02T12:46:18Z","updated_at":"2015-01-02T12:46:19Z","closed_at":"2015-01-02T12:46:19Z","body":"It would be nice if literalinclude directive understood fields start-after and end-before like rst's normal include directive. It would be even better to also have start-after-line and end-before-line directives that would behave the same way, but would skip the line containing the occurrence of the parameter. So that if one had the following two files\n\nsample.py\n...\n# example of quicksort\n...\n# end example of quicksort\n...\n\nsample.rst\n...\n.. literalinclude:: sample.py\n   :start-after-line: quicksort\n   :end-before-line: quicksort\n\nThe output would be the code snipped with the example.\n\n----------------------------------------\n- Bitbucket: https://bitbucket.org/birkenfeld/sphinx/issue/78\n- Originally reported by: Dmitriy Morozov\n- Originally created at: 2008-12-26T00:49:51.140\n"}}