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

[WIP] Implement inline-toc extra for TOC HTML insertion after first heading #280

Closed
wants to merge 3 commits into from
Closed

Commits on Nov 14, 2017

  1. Implement inline-toc extra for TOC HTML insertion after first heading

    Fixes #279
    
    Instead of adding a new CLI switch and trying to figure out whether CLI vs module usage is distinguishable, I have decided to create a sister extra for toc and make if behave the same way, but insert the TOC HTML to the MarkDown HTML (after the first heading) as well as preserving it as a property. This allows CLI usages the flexibility to just replace `toc` with `inline-toc` and get a table of contents right after the first heading without any worries about backwards compatibility or pollution the CLI switches. I believe this to be the cleanest solution.
    TomasHubelbauer committed Nov 14, 2017
    Copy the full SHA
    a365aed View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2017

  1. Copy the full SHA
    64cd722 View commit details
    Browse the repository at this point in the history
  2. Fix calculating toc_html on UnicodeWithAttrs unpythonically

    `toc_html = property(calculate_toc_html(self._toc))` doesn't seem to work because `self` is not valid in that context so I had to hack around it with the useless proxy method.
    TomasHubelbauer committed Nov 16, 2017
    Copy the full SHA
    c707ba2 View commit details
    Browse the repository at this point in the history