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

Registration of extensions changed #2

Open
jwt625 opened this issue Nov 18, 2016 · 3 comments
Open

Registration of extensions changed #2

jwt625 opened this issue Nov 18, 2016 · 3 comments

Comments

@jwt625
Copy link

jwt625 commented Nov 18, 2016

See Showdown CHANGELOG for detail.
So I just modified the third last line in showdown-toc.js from
if (typeof window !== 'undefined' && window.showdown && window.showdown.extensions) { window.showdown.extensions.toc = toc; }
to
if (typeof window !== 'undefined' && window.showdown && window.showdown.extension) { window.showdown.extension("showdown-toc",toc); }
and initialize the converter with option { extensions: ['showdown-toc'] }, it works.
Hope this can help.

@jwt625
Copy link
Author

jwt625 commented Feb 23, 2017

Here for the corrected version (which also fixed interruption from lower level toc).

@byYufeng
Copy link

Here for the corrected version (which also fixed interruption from lower level toc).

I catch error after using your code:
Uncaught Error: Extension "showdowntoc" could not be loaded.

@ahungrynoob
Copy link

I create a new one, https://github.com/ahungrynoob/showdown-toc

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

3 participants