Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TOC entries only generated when online #3

Closed
dmolesUC opened this issue Mar 11, 2016 · 2 comments
Closed

TOC entries only generated when online #3

dmolesUC opened this issue Mar 11, 2016 · 2 comments

Comments

@dmolesUC
Copy link

Steps to reproduce:

  1. ensure machine is connected to the Internet.

  2. find or write a Markdown document that should generate a good TOC, e.g.
    this gist.

  3. use gh-md-toc to generate a TOC for it, to stdout.

    $ ~/bin/gh-md-toc ~/Desktop/burnout.md
    
    Table of Contents
    =================
    
    * ["The Modern Day Sisyphus: \#libtech Burnout and You": <a href="https://twitter\.com/yo\_bj">Becky Yoose</a>](#the-modern-day-sisyphus-libtech-burnout-and-you-becky-yoose)
      * [Abstract &amp; slides](#abstract--slides)
      * [twelve phases of burnout](#twelve-phases-of-burnout)
      * [what's special about \#libtech burnout](#whats-special-about-libtech-burnout)
      * [how to prevent/recover](#how-to-preventrecover)
      * [\.\.\.but this isn't about what the victim should do](#but-this-isnt-about-what-the-victim-should-do)
        * [co\-workers](#co-workers)
        * [managers](#managers)
        * [community](#community)
      * [community privilege](#community-privilege)
    
    Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc.go)
    $
    
  4. turn off networking

  5. attempt to generate the TOC again.

Expected:

  • same TOC is generated as in step 3.

Actual:

  • only header is generated:

    $ ~/bin/gh-md-toc ~/Desktop/burnout.md
    
    Table of Contents
    =================
    
    
    Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc.go)
    $
    

Notes

  • MacOS X 10.10.5
  • go version go1.6 darwin/amd64
  • gh-md-toc 5.0 built from commit 0523167
@ekalinin
Copy link
Owner

Hey @dmolesUC3

Yeah, it can work only when the Internet is on. As I didn't want to write a parser MD → HTML.
For converting markdown into plain HTML, I use GitHub's API. That's why this tool always needs an internet connection.

@dmolesUC
Copy link
Author

OK. It might be nice to get an error message and document that in the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants