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

should not require markdown-it #2

Closed arve0 closed 8 years ago

arve0 commented 8 years ago

Plugins should not require markdown-it, to reduce bloat. A worse case scenario:

node_modules/markdown-it (5.0.0) node_modules/plugin1/node_modules/markdown-it (4.0.0) node_modules/plugin2/node_modules/markdown-it (4.4.0)

We now have three copies of markdown-it.

Token can be accessed through state.Token in rules. state is passed as the first argument.

MoOx commented 8 years ago

PR are welcome :)