medfreeman / markdown-it-toc-and-anchor

markdown-it plugin to add a toc and anchor links in headings
MIT License
60 stars 35 forks source link

update npm release version please. #36

Closed CHENXCHEN closed 5 years ago

CHENXCHEN commented 7 years ago

i had meet this problem. TypeError: Cannot read property 'type' of undefined and i found the problem is from dist/index.js at 55 line and src/index.js at 174 if (heading.children && heading.children[0].type === "link_open") { the problem is heading.children's length is 0 and try to get the element from heading.children. and i found the problem had been solved in gist src/index.js at Line 173 now the latest is v4.1.2, update npm release version please.

CHENXCHEN commented 7 years ago

@medfreeman

medfreeman commented 5 years ago

fixed in v4.2.0