Skip to content

Support Markdown table of contents in issue / MR descriptions

Brett Walker requested to merge 21901-support-for-toc-in-readme-files into master

What does this MR do?

This adds support for the [[_TOC_]] table of contents tag that we have supported in the wiki (which uses the Gollum syntax). This will work in places that accepts markdown and generate header anchors, such as markdown files in the repository, issues and merge request descriptions, and the wiki.

It will not work for notes and comments.

[[_TOC_]] was chosen as the quickest and easiest to syntax to get this working, and it's consistent with the wiki syntax. Should a clear preference ever be established in markdown, we will add that syntax.

Related to #21901 (closed) and #30523 (closed)

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Closes #21901 (closed)

Edited by Heinrich Lee Yu

Merge request reports