Skip to content

Conversation

mytharcher
Copy link

I think auto-generation of table of content(TOC) is very useful. And I searched and found jtopjian's fork had done that yet. so I merge his branch to my fork.

Beside jtopjian's TOC upgrade, I also did an improvement, which one could use TOC by headers' ID not specified(the not specified ID would be replaced by the header text).

@michelf
Copy link
Owner

michelf commented Apr 20, 2012

I don't think it is the role of Markdown (or Markdown Extra) to create an outline of your document. If you need an outline, it can and should be done by scanning the resulting HTML following the algorithm specified in the HTML5 spec.

Also, auto-generating id attributes is problematic, because they must be unique. The user might have specified the same value for an id attribute elsewhere in the document, or might embed the document into something which already has an identical id attribute.

Otherwise, this patch looks well done. If it works well for you that's great. But I won't merge it for the reasons stated above, sorry.

@michelf michelf closed this Apr 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants