Markdown table of contents: edge case
Markdown table of contents: edge case: a task in smol-software-harbor (Harbor dataset). A README with several Usage sections gets a table of contents whose links all jump to the first one. Toc.entries in lib/toc.rb must make anchors unique as documented: the second Usage becomes usage-1 , the…
The task
A README with several `## Usage` sections gets a table of contents whose links all jump to the first one. `Toc.entries` in `lib/toc.rb` must make anchors unique as documented: the second `Usage` becomes `usage-1`, the third `usage-2`, and so on. Run `for f in test/*_test.rb; do ruby -Ilib "$f" || exit 1; done`.
Part of efederici/smol-software-harbor.