Table of contents generator
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 5.3k
- Forks
- 510
- Avg merge
- 8d 5h
- Merged PRs (30d)
- 5
Description
I recommend adding a table of contents generator feature. A placeholder like pandoc's --toc or MultiMarkdown's {{toc}} will be expanded into list of links nested by heading level.
Given the markdown:
# Markdown
--toc
# History
John Grubner created the Markdown language in 2004.
## Standardization
There is no clearly defined Markdown standard, apart from the original writeup and implementation by John Gruber, which some consider abandonware.
## CommonMark
From 2012, a group of people including Jeff Atwood launched what Atwood characterized as a standardization effort.
# Implementations
Implementations of Markdown are available for over a dozen programming languages.
The generated html will be
<h1 id="markdown">Markdown</h1>
<ul>
<li>
<a href="#history">History</a>
<ul>
<li><a href="#standardization">Standardization</a></li>
<li><a href="#commonmark">CommonMark</a></li>
</ul>
</li>
<li><a href="#implementations">Implementation</a></li>
</ul>
<h1 id="history">History</h1>
<p>John Grubner created the Markdown language in 2004.</p>
<h2 id="standardization">Standardization</h2>
<p>There is no clearly defined Markdown standard, apart from the original writeup and implementation by John Gruber, which some consider abandonware.</p>
<h2 id="commonmark">CommonMark</h2>
<p>From 2012, a group of people including Jeff Atwood launched what Atwood characterized as a standardization effort.</p>
<h1 id="implementations">Implementations</h1>
<p>Implementations of Markdown are available for over a dozen programming languages.</p>
Which looks like this:
Markdown
-
History
- Standardization
- CommonMark
- Implementation
History
John Grubner created the Markdown language in 2004.
Standardization
There is no clearly defined Markdown standard, apart from the original writeup and implementation by John Gruber, which some consider abandonware.
CommonMark
From 2012, a group of people including Jeff Atwood launched what Atwood characterized as a standardization effort.
Implementations
Implementations of Markdown are available for over a dozen programming languages.
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 files or tests are named in the issue; begin by locating Markdig’s Markdown parsing and HTML rendering entry points. Compare the requested placeholder behavior and sample output with existing heading-anchor handling, then define tests covering nested heading levels and verify the generated HTML matches the example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- content
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100