Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/magnetikonline/markdown-toc-generate
Table of contents (TOC) generator for a given Markdown page source.
https://github.com/magnetikonline/markdown-toc-generate
markdown webtool
Last synced: about 1 month ago
JSON representation
Table of contents (TOC) generator for a given Markdown page source.
- Host: GitHub
- URL: https://github.com/magnetikonline/markdown-toc-generate
- Owner: magnetikonline
- License: mit
- Created: 2014-08-26T04:48:50.000Z (about 10 years ago)
- Default Branch: main
- Last Pushed: 2024-05-19T07:15:59.000Z (4 months ago)
- Last Synced: 2024-05-19T08:24:10.410Z (4 months ago)
- Topics: markdown, webtool
- Language: JavaScript
- Homepage: https://magnetikonline.github.io/markdown-toc-generate/
- Size: 25.4 KB
- Stars: 24
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Markdown TOC generate
Client side Markdown table of contents (TOC) generator.## Usage
- Paste source Markdown document into first textarea.
- Select options.
- Hit Generate.
- Final table of contents dropped into second textarea.
- Hit Copy to clipboard and you're done.## Tests
Tests for `stripPunctuation()`, a JavaScript implementation of [CommonMark's](https://github.com/github/cmark-gfm) [`int cmark_utf8proc_is_punctuation(int32_t uc)`](https://github.com/github/cmark-gfm/blob/aed182ed089f1c4d42b75657064ae76904e9e024/src/utf8.c#L256-L317) function under [`test/`](test/).Implementation of `stripPunctuation()` ensures generated links to headings are valid when dealing with characters/languages using extended UTF-8 character sets.
## Online
Available here: https://magnetikonline.github.io/markdown-toc-generate/.Built and tested against Google Chrome (version 75).
## Reference
- https://github.com/github/cmark-gfm
- [`int cmark_utf8proc_is_punctuation(int32_t uc)`](https://github.com/github/cmark-gfm/blob/aed182ed089f1c4d42b75657064ae76904e9e024/src/utf8.c#L256-L317)