--- title: GitLab Flavored Markdown (GLFM) Spec version: alpha ... # Introduction TODO: Write a GitLab-specific version of the GitHub Flavored Markdown intro section. # GitLab Official Specification Markdown Currently, only some of the GitLab-specific markdown features are listed in this section. We may eventually add all GitLab-specific features currently listed as supported in the [user-facing documentation for GitLab Flavored Markdown](https://docs.gitlab.com/ee/user/markdown.html). There is currently only this single top-level heading, but the examples may be split into multiple top-level headings in the future. ## Footnotes See [the footnotes section of the user-facing documentation for GitLab Flavored Markdown](https://docs.gitlab.com/ee/user/markdown.html#footnotes). ```````````````````````````````` example gitlab footnote reference tag [^fortytwo] [^fortytwo]: footnote text .

footnote reference tag 1

  1. footnote text

```````````````````````````````` ## Task list items See [Task lists](https://docs.gitlab.com/ee/user/markdown.html#task-lists) in the GitLab Flavored Markdown documentation. Task list items (checkboxes) are defined as a GitHub Flavored Markdown extension in a section above. GitLab extends the behavior of task list items to support additional features. Some of these features are in-progress, and should not yet be considered part of the official GitLab Flavored Markdown specification. Some of the behavior of task list items is implemented as client-side JavaScript/CSS. The following are some basic examples; more examples may be added in the future. Incomplete task: ```````````````````````````````` example gitlab - [ ] incomplete . ```````````````````````````````` Completed task: ```````````````````````````````` example gitlab - [x] completed . ```````````````````````````````` Inapplicable task: ```````````````````````````````` example gitlab - [~] inapplicable . ```````````````````````````````` Inapplicable task in a "loose" list. Note that the `` tag is not applied to the loose text; it has strikethrough applied with CSS. ```````````````````````````````` example gitlab - [~] inapplicable text in loose list . ```````````````````````````````` ## Front matter See [Front matter](https://docs.gitlab.com/ee/user/markdown.html#front-matter) in the GitLab Flavored Markdown documentation. Front matter is metadata included at the beginning of a Markdown document, preceding the content. This data can be used by static site generators like Jekyll, Hugo, and many other applications. YAML front matter: ```````````````````````````````` example gitlab --- title: YAML front matter --- .

title: YAML front matter

```````````````````````````````` TOML front matter: ```````````````````````````````` example gitlab +++ title: TOML front matter +++ .

title: TOML front matter

```````````````````````````````` JSON front matter: ```````````````````````````````` example gitlab ;;; { "title": "JSON front matter" } ;;; .

{
  "title": "JSON front matter"
}

```````````````````````````````` Front matter blocks should be inserted at the top of the document: ```````````````````````````````` example gitlab text --- title: YAML front matter --- .

text


title: YAML front matter

```````````````````````````````` Front matter block delimiters shouldn’t be preceded by space characters: ```````````````````````````````` example gitlab --- title: YAML front matter --- .

title: YAML front matter

```````````````````````````````` ## Table of contents See [table of contents](https://docs.gitlab.com/ee/user/markdown.html#table-of-contents) in the GitLab Flavored Markdown documentation. A table of contents is an unordered list that links to subheadings in the document. Add either the `[[_TOC_]]` or `[TOC]` tag on its own line. ```````````````````````````````` example gitlab [TOC] # Heading 1 ## Heading 2 .

Heading 1

Heading 2

```````````````````````````````` ```````````````````````````````` example gitlab [[_TOC_]] # Heading 1 ## Heading 2 .

Heading 1

Heading 2

```````````````````````````````` A table of contents is a block element. It should preceded and followed by a blank line. ```````````````````````````````` example gitlab [[_TOC_]] text text [TOC] .

[[TOC]]text

text[TOC]

```````````````````````````````` A table of contents can be indented with up to three spaces. ```````````````````````````````` example gitlab [[_TOC_]] # Heading 1 .

Heading 1

````````````````````````````````