MacDownApp / MacDownApp/macdown

Generate full TOC in Markdown

Open
#431 11 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Rich Text Format
Stars
9.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

I looked around and did not see any issues related to this topic.

I sometimes want to generate a toc at the beginning section of a long document and for now I'm doing it by hand:

```
TOC:
[Section 1]({{page.url}}/#section1
[Section 2]({{page.url}}/#section2
......


##Section 1
......

##Section 2
```

But this messes up the preview. Seen in the screenshot.
![macdown-toc-screenshot](https://cloud.githubusercontent.com/assets/10719482/9561390/4283283e-4e76-11e5-8d06-69eaa72d2fd4.jpg)

At first texts immediately after the div mark eg. section titles stops rendering, and after a few saves whole sections are showing in plain text. Maths and HTML stays fine, and the file renders fine in Jekyll, just not in MacDown Preview.

Also in the screenshot you can see I used the liquid mark `{% raw %}` which MacDown doesn't recognize. It would be nice MacDown can process it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named in the issue. Start by locating MacDown's Markdown preview and document-rendering code, then define whether completion means generating a full TOC, preserving HTML and math rendering, or supporting the Jekyll Liquid syntax described in the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
jekyll, macos, markdown
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.