{"action":"created","issue":{"url":"https://api.github.com/repos/ekalinin/github-markdown-toc/issues/14","labels_url":"https://api.github.com/repos/ekalinin/github-markdown-toc/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/ekalinin/github-markdown-toc/issues/14/comments","events_url":"https://api.github.com/repos/ekalinin/github-markdown-toc/issues/14/events","html_url":"https://github.com/ekalinin/github-markdown-toc/issues/14","id":98287656,"number":14,"title":"Error: \"grep: unrecognized option `--null-data' \"","user":{"login":"HappyRay","id":6646529,"avatar_url":"https://avatars.githubusercontent.com/u/6646529?v=3","gravatar_id":"","url":"https://api.github.com/users/HappyRay","html_url":"https://github.com/HappyRay","followers_url":"https://api.github.com/users/HappyRay/followers","following_url":"https://api.github.com/users/HappyRay/following{/other_user}","gists_url":"https://api.github.com/users/HappyRay/gists{/gist_id}","starred_url":"https://api.github.com/users/HappyRay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HappyRay/subscriptions","organizations_url":"https://api.github.com/users/HappyRay/orgs","repos_url":"https://api.github.com/users/HappyRay/repos","events_url":"https://api.github.com/users/HappyRay/events{/privacy}","received_events_url":"https://api.github.com/users/HappyRay/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-07-30T23:46:18Z","updated_at":"2015-08-03T12:21:16Z","closed_at":"2015-08-02T12:19:58Z","body":"Hi, \r\n\r\nYour tool looks great and would save a lot of work for me. \r\n\r\nHowever when I tried your tool with one of my wiki page\r\n\r\ngh-md-toc https://github.com/box/TestScribe/wiki/FAQ\r\n\r\nI got the following error\r\n\r\n    Table of Contents\r\n    =================\r\n    \r\n    grep: unrecognized option `--null-data'\r\n    usage: grep [-abcDEFGHhIiJLlmnOoqRSsUVvwxZ] [-A num] [-B num] [-C[num]]\r\n        \t[-e pattern] [-f file] [--binary-files=value] [--color=when]\r\n\t        [--context[=num]] [--directories=action] [--label] [--line-buffered]\r\n\t      [--null] [pattern] [file ...]\r\n\r\n\r\n    Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)\r\n\r\nI got the same error when I run it with a local .md file.\r\n\r\nWhat did I miss?"},"comment":{"url":"https://api.github.com/repos/ekalinin/github-markdown-toc/issues/comments/127216415","html_url":"https://github.com/ekalinin/github-markdown-toc/issues/14#issuecomment-127216415","issue_url":"https://api.github.com/repos/ekalinin/github-markdown-toc/issues/14","id":127216415,"user":{"login":"ekalinin","id":234891,"avatar_url":"https://avatars.githubusercontent.com/u/234891?v=3","gravatar_id":"","url":"https://api.github.com/users/ekalinin","html_url":"https://github.com/ekalinin","followers_url":"https://api.github.com/users/ekalinin/followers","following_url":"https://api.github.com/users/ekalinin/following{/other_user}","gists_url":"https://api.github.com/users/ekalinin/gists{/gist_id}","starred_url":"https://api.github.com/users/ekalinin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekalinin/subscriptions","organizations_url":"https://api.github.com/users/ekalinin/orgs","repos_url":"https://api.github.com/users/ekalinin/repos","events_url":"https://api.github.com/users/ekalinin/events{/privacy}","received_events_url":"https://api.github.com/users/ekalinin/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T12:21:16Z","updated_at":"2015-08-03T12:21:16Z","body":"> Notice the leading spaces before '*' character? I had to remove them manually.\r\n\r\nYeah, now i see.\r\n\r\nIt's not a bug :) it's a feature.\r\nFor every header i put two spaces before asterisk.\r\nThis is for tree-like output of the TOC.\r\nUsually, headers are located as follows ``h1 > h2 > h3 .. > h6``.\r\n\r\nFor example. Page:\r\n  * https://github.com/ekalinin/nodeenv/wiki/Who-Uses-Nodeenv\r\n\r\nThere's one ``h1`` header and two ``h2`` headers.\r\n\r\nAnd here's an output:\r\n\r\n```bash\r\n➥ ./gh-md-toc https://github.com/ekalinin/nodeenv/wiki/Who-Uses-Nodeenv\r\n\r\nTable of Contents\r\n=================\r\n\r\n  * [Who Uses Nodeenv?](#who-uses-nodeenv)\r\n    * [OpenStack](#openstack)\r\n    * [pre-commit.com](#pre-commitcom)\r\n```\r\n\r\nSo, in your case i see a lot of headers like ``h3`` and ``h4``.\r\nAnd that's the reason of such amout of leading spaces."}}