{"action":"created","issue":{"url":"https://api.github.com/repos/junakowicz/gitbook-plugin-include-highlight/issues/1","labels_url":"https://api.github.com/repos/junakowicz/gitbook-plugin-include-highlight/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/junakowicz/gitbook-plugin-include-highlight/issues/1/comments","events_url":"https://api.github.com/repos/junakowicz/gitbook-plugin-include-highlight/issues/1/events","html_url":"https://github.com/junakowicz/gitbook-plugin-include-highlight/issues/1","id":74127506,"number":1,"title":"provide a way to incude only specific lines","user":{"login":"nemequ","id":1151,"avatar_url":"https://avatars.githubusercontent.com/u/1151?v=3","gravatar_id":"","url":"https://api.github.com/users/nemequ","html_url":"https://github.com/nemequ","followers_url":"https://api.github.com/users/nemequ/followers","following_url":"https://api.github.com/users/nemequ/following{/other_user}","gists_url":"https://api.github.com/users/nemequ/gists{/gist_id}","starred_url":"https://api.github.com/users/nemequ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nemequ/subscriptions","organizations_url":"https://api.github.com/users/nemequ/orgs","repos_url":"https://api.github.com/users/nemequ/repos","events_url":"https://api.github.com/users/nemequ/events{/privacy}","received_events_url":"https://api.github.com/users/nemequ/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-07T21:05:52Z","updated_at":"2015-05-12T09:52:02Z","closed_at":null,"body":"It would be nice if it were possible to include only specific lines, using a substring-like notation where negative values count backwards from the end of the file.  This would allow you to have a complete file (so you can run tests to make sure everything works), but only include the relevant bits in the book.  For example, a hello world example in C might look like \r\n\r\n```c\r\n#include <stdio.h>\r\n\r\nint main(int argc, char *argv[]) {\r\n  printf(\"Hello, world!\\n\");\r\n\r\n  return 0;\r\n}\r\n```\r\n\r\nBut you may only want to put \r\n\r\n```C\r\nprintf(\"Hello, world!\\n\");\r\n```\r\n\r\nIn the book.\r\n\r\nNote the difference in syntax highlighting there, too—it would probably be best to run the whole file through the highlighter then extract the relevant slice rather than running only the requested lines through the highlighter."},"comment":{"url":"https://api.github.com/repos/junakowicz/gitbook-plugin-include-highlight/issues/comments/101218638","html_url":"https://github.com/junakowicz/gitbook-plugin-include-highlight/issues/1#issuecomment-101218638","issue_url":"https://api.github.com/repos/junakowicz/gitbook-plugin-include-highlight/issues/1","id":101218638,"user":{"login":"prudhomm","id":151693,"avatar_url":"https://avatars.githubusercontent.com/u/151693?v=3","gravatar_id":"","url":"https://api.github.com/users/prudhomm","html_url":"https://github.com/prudhomm","followers_url":"https://api.github.com/users/prudhomm/followers","following_url":"https://api.github.com/users/prudhomm/following{/other_user}","gists_url":"https://api.github.com/users/prudhomm/gists{/gist_id}","starred_url":"https://api.github.com/users/prudhomm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prudhomm/subscriptions","organizations_url":"https://api.github.com/users/prudhomm/orgs","repos_url":"https://api.github.com/users/prudhomm/repos","events_url":"https://api.github.com/users/prudhomm/events{/privacy}","received_events_url":"https://api.github.com/users/prudhomm/received_events","type":"User","site_admin":false},"created_at":"2015-05-12T09:52:02Z","updated_at":"2015-05-12T09:52:02Z","body":":+1: \r\n\r\nthe interface would be\r\n!CODEFILE \"myfile.cpp\" marker1\r\nthe marked region starts with the comment characters from the language then the marker name is embedded in brackets.\r\nFor example in C++\r\n```cpp\r\n// [marker1]\r\n//everything in between is inserted\r\nauto i = 1;\r\n// [marker1]\r\n```"}}