awesome-rust icon indicating copy to clipboard operation
awesome-rust copied to clipboard

Replace node toc lint with a Rust one

Open palfrey opened this issue 3 years ago • 4 comments

Steps:

  1. Fix https://github.com/pbzweihander/markdown-toc/issues/2 and possibly other things there so it can replace ToC blocks in markdown
  2. Replace lint-markdown-toc with the Rust markdown-toc

palfrey avatar Jul 31 '22 19:07 palfrey

@palfrey I checked the code base the --inline and replace options are disabled on purpose

neuodev avatar Aug 22 '22 02:08 neuodev

I added the support to --inline and --replace in this https://github.com/pbzweihander/markdown-toc/pull/11 according to the specification

neuodev avatar Aug 22 '22 03:08 neuodev

The fix got merged!

neuodev avatar Aug 22 '22 05:08 neuodev

There still appears to be various issues with it that make it currently unusable for this repo:

  • If I run repeatedly with --replace it seems to make multiple ToCs clashing with each other
  • There isn't any way to say "we want this block of text before the ToC" and/or "insert the ToC here" e.g. like the <!-- toc -->/ <!-- tocstop --> markers of the Node equivalent.

palfrey avatar Sep 03 '22 10:09 palfrey