MacDownApp / MacDownApp/macdown
TOC-Tag for specified levels
Nobody has claimed this yet.
- Dominant language
- Rich Text Format
- Stars
- 9.8k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
In one of my longer documents I'm using all six levels of headers (h1-h6) and the TOC becomes really huge. It would be nice to be able to specify which header levels to include in the TOC. For example:
[TOC 3]
would only include h1-h3.
And because I normally use h1 and h2 as sort of a title for my documents and don't use them anywhere else, it would be even nicer if I could also specify a start level, so
[TOC 3-4]
would only include the header levels h3 and h4 in the TOC.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start by locating the code that parses [TOC] markers and builds the table of contents, then inspect how heading levels are collected. Done means supporting [TOC 3] as h1-h3 and [TOC 3-4] as h3-h4, with tests covering both forms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100