vscode-markdown icon indicating copy to clipboard operation
vscode-markdown copied to clipboard

Compatible GitHub Action for TOC enforcement

Open nfx opened this issue 2 years ago • 3 comments

It's a good extension for table of contents, when editing it from VSCode. But the question is - if someone is to use github.dev to make edits to a markdown file and forget making a table-of-contents change, how to automatically verify it? how to automatically create a TOC entry? could you make https://github.com/yzhang-gh/vscode-markdown/blob/master/src/toc.ts more library-friendly?

Ideally - there would be a github action and npx script to do this

nfx avatar Feb 20 '24 10:02 nfx

Hi, sorry for the late reply. That's an interesting topic, something like a CLI TOC "formatter". It requires some effort but the problem is I may not have the time.

yzhang-gh avatar Mar 23 '24 08:03 yzhang-gh

I'll probably end up writing it in Go...

nfx avatar Mar 24 '24 23:03 nfx

Would be much easier to write a script and copy-paste some of the useful code snippets from this repository (instead of reshaping this one).

yzhang-gh avatar Mar 25 '24 15:03 yzhang-gh