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.
See Showdown CHANGELOG for detail.
So I just modified the third last line in
showdown-toc.jsfromif (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.