Skip to content

Add support for `[TOC]` to generate a table of contents in Markdown

Additional information from issue https://gitlab.com/gitlab-org/gitlab-ce/issues/64358 and #21901 (closed)

Currently, it is possible to generate a Table of Contents in Markdown by adding the [[_TOC_]] tag. This was added in Issue gitlab-ce#2494 and !24196 (merged). Would it be possible to extend this to support using

to add a Table of Contents as well? As noted in the forum thread below, some Markdown editors such as stackedit.io and Typora interpret as a ToC rather than [[_TOC_]]. I also have my repository's wiki mirrored on Bitbucket and I found that their software also recognises but not [[_TOC_]]. Thanks.

git user

sth.....

title-1

title-2

title-3


Links / references

Edited by Brett Walker