diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-27 03:10:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-27 03:10:35 +0300 |
commit | 135dd0646bd1402985d82d99eb1e667a0f695e8b (patch) | |
tree | 7e062800b550e3ab36b8d8f9b1270c563aee6f2d /glfm_specification/output_spec | |
parent | f825fd1d881ce077ad868a70fd8d7db6a49e4700 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'glfm_specification/output_spec')
-rw-r--r-- | glfm_specification/output_spec/spec.html | 276 | ||||
-rw-r--r-- | glfm_specification/output_spec/spec.txt | 287 |
2 files changed, 563 insertions, 0 deletions
diff --git a/glfm_specification/output_spec/spec.html b/glfm_specification/output_spec/spec.html new file mode 100644 index 00000000000..3a7b08e0a5e --- /dev/null +++ b/glfm_specification/output_spec/spec.html @@ -0,0 +1,276 @@ +<div class="gl-relative markdown-code-block js-markdown-code"> +<pre data-sourcepos="1:1-4:3" class="code highlight js-syntax-highlight language-yaml" lang="yaml" data-lang-params="frontmatter" v-pre="true"><code><span id="LC1" class="line" lang="yaml"><span class="na">title</span><span class="pi">:</span> <span class="s">GitLab Flavored Markdown (GLFM) Spec</span></span> +<span id="LC2" class="line" lang="yaml"><span class="na">version</span><span class="pi">:</span> <span class="s">alpha</span></span></code></pre> +<copy-code></copy-code> +</div> +<h1 data-sourcepos="5:1-5:14" dir="auto"> +<a id="user-content-introduction" class="anchor" href="#introduction" aria-hidden="true"></a>Introduction</h1> +<p data-sourcepos="7:1-7:84" dir="auto">TODO: Write a GitLab-specific version of the GitHub Flavored Markdown intro section.</p> + +<h1 data-sourcepos="10:1-10:40" dir="auto"> +<a id="user-content-gitlab-official-specification-markdown" class="anchor" href="#gitlab-official-specification-markdown" aria-hidden="true"></a>GitLab Official Specification Markdown</h1> +<p data-sourcepos="12:1-15:104" dir="auto">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 +<a href="https://docs.gitlab.com/ee/user/markdown.html" rel="nofollow noreferrer noopener" target="_blank">user-facing documentation for GitLab Flavored Markdown</a>.</p> +<p data-sourcepos="17:1-18:69" dir="auto">There is currently only this single top-level heading, but the +examples may be split into multiple top-level headings in the future.</p> +<h2 data-sourcepos="20:1-20:12" dir="auto"> +<a id="user-content-footnotes" class="anchor" href="#footnotes" aria-hidden="true"></a>Footnotes</h2> +<p data-sourcepos="22:1-23:143" dir="auto">See +<a href="https://docs.gitlab.com/ee/user/markdown.html#footnotes" rel="nofollow noreferrer noopener" target="_blank">the footnotes section of the user-facing documentation for GitLab Flavored Markdown</a>.</p> +<div class="gl-relative markdown-code-block js-markdown-code"> +<pre data-sourcepos="25:1-49:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" data-canonical-lang="example" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">footnote reference tag [^fortytwo]</span> +<span id="LC2" class="line" lang="plaintext"></span> +<span id="LC3" class="line" lang="plaintext">[^fortytwo]: footnote text</span> +<span id="LC4" class="line" lang="plaintext">.</span> +<span id="LC5" class="line" lang="plaintext"><p></span> +<span id="LC6" class="line" lang="plaintext">footnote reference tag</span> +<span id="LC7" class="line" lang="plaintext"><sup></span> +<span id="LC8" class="line" lang="plaintext"><a href="#fn-fortytwo-42" id="fnref-fortytwo-42" data-footnote-ref></span> +<span id="LC9" class="line" lang="plaintext">1</span> +<span id="LC10" class="line" lang="plaintext"></a></span> +<span id="LC11" class="line" lang="plaintext"></sup></span> +<span id="LC12" class="line" lang="plaintext"></p></span> +<span id="LC13" class="line" lang="plaintext"><section data-footnotes></span> +<span id="LC14" class="line" lang="plaintext"><ol></span> +<span id="LC15" class="line" lang="plaintext"><li id="fn-fortytwo-42"></span> +<span id="LC16" class="line" lang="plaintext"><p></span> +<span id="LC17" class="line" lang="plaintext">footnote text</span> +<span id="LC18" class="line" lang="plaintext"><a href="#fnref-fortytwo-42" data-footnote-backref></span> +<span id="LC19" class="line" lang="plaintext"></a></span> +<span id="LC20" class="line" lang="plaintext"></p></span> +<span id="LC21" class="line" lang="plaintext"></li></span> +<span id="LC22" class="line" lang="plaintext"></ol></span> +<span id="LC23" class="line" lang="plaintext"></section></span></code></pre> +<copy-code></copy-code> +</div> +<h2 data-sourcepos="51:1-51:18" dir="auto"> +<a id="user-content-task-list-items" class="anchor" href="#task-list-items" aria-hidden="true"></a>Task list items</h2> +<p data-sourcepos="53:1-54:117" dir="auto">See +<a href="https://docs.gitlab.com/ee/user/markdown.html#task-lists" rel="nofollow noreferrer noopener" target="_blank">Task lists</a> in the GitLab Flavored Markdown documentation.</p> +<p data-sourcepos="56:1-59:39" dir="auto">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.</p> +<p data-sourcepos="61:1-61:85" dir="auto">Some of the behavior of task list items is implemented as client-side JavaScript/CSS.</p> +<p data-sourcepos="63:1-63:80" dir="auto">The following are some basic examples; more examples may be added in the future.</p> +<p data-sourcepos="65:1-65:16" dir="auto">Incomplete task:</p> +<div class="gl-relative markdown-code-block js-markdown-code"> +<pre data-sourcepos="67:1-77:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" data-canonical-lang="example" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">- [ ] incomplete</span> +<span id="LC2" class="line" lang="plaintext">.</span> +<span id="LC3" class="line" lang="plaintext"><ul></span> +<span id="LC4" class="line" lang="plaintext"><li></span> +<span id="LC5" class="line" lang="plaintext"><task-button/></span> +<span id="LC6" class="line" lang="plaintext"><input type="checkbox" disabled/></span> +<span id="LC7" class="line" lang="plaintext">incomplete</span> +<span id="LC8" class="line" lang="plaintext"></li></span> +<span id="LC9" class="line" lang="plaintext"></ul></span></code></pre> +<copy-code></copy-code> +</div> +<p data-sourcepos="79:1-79:15" dir="auto">Completed task:</p> +<div class="gl-relative markdown-code-block js-markdown-code"> +<pre data-sourcepos="81:1-91:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" data-canonical-lang="example" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">- [x] completed</span> +<span id="LC2" class="line" lang="plaintext">.</span> +<span id="LC3" class="line" lang="plaintext"><ul></span> +<span id="LC4" class="line" lang="plaintext"><li></span> +<span id="LC5" class="line" lang="plaintext"><task-button/></span> +<span id="LC6" class="line" lang="plaintext"><input type="checkbox" checked disabled/></span> +<span id="LC7" class="line" lang="plaintext">completed</span> +<span id="LC8" class="line" lang="plaintext"></li></span> +<span id="LC9" class="line" lang="plaintext"></ul></span></code></pre> +<copy-code></copy-code> +</div> +<p data-sourcepos="93:1-93:18" dir="auto">Inapplicable task:</p> +<div class="gl-relative markdown-code-block js-markdown-code"> +<pre data-sourcepos="95:1-107:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" data-canonical-lang="example" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">- [~] inapplicable</span> +<span id="LC2" class="line" lang="plaintext">.</span> +<span id="LC3" class="line" lang="plaintext"><ul></span> +<span id="LC4" class="line" lang="plaintext"><li></span> +<span id="LC5" class="line" lang="plaintext"><task-button/></span> +<span id="LC6" class="line" lang="plaintext"><input type="checkbox" data-inapplicable disabled></span> +<span id="LC7" class="line" lang="plaintext"><s></span> +<span id="LC8" class="line" lang="plaintext">inapplicable</span> +<span id="LC9" class="line" lang="plaintext"></s></span> +<span id="LC10" class="line" lang="plaintext"></li></span> +<span id="LC11" class="line" lang="plaintext"></ul></span></code></pre> +<copy-code></copy-code> +</div> +<p data-sourcepos="109:1-110:50" dir="auto">Inapplicable task in a "loose" list. Note that the <code><del></code> tag is not applied to the +loose text; it has strikethrough applied with CSS.</p> +<div class="gl-relative markdown-code-block js-markdown-code"> +<pre data-sourcepos="112:1-131:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" data-canonical-lang="example" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">- [~] inapplicable</span> +<span id="LC2" class="line" lang="plaintext"></span> +<span id="LC3" class="line" lang="plaintext"> text in loose list</span> +<span id="LC4" class="line" lang="plaintext">.</span> +<span id="LC5" class="line" lang="plaintext"><ul></span> +<span id="LC6" class="line" lang="plaintext"><li></span> +<span id="LC7" class="line" lang="plaintext"><p></span> +<span id="LC8" class="line" lang="plaintext"><task-button/></span> +<span id="LC9" class="line" lang="plaintext"><input type="checkbox" data-inapplicable disabled></span> +<span id="LC10" class="line" lang="plaintext"><s></span> +<span id="LC11" class="line" lang="plaintext">inapplicable</span> +<span id="LC12" class="line" lang="plaintext"></s></span> +<span id="LC13" class="line" lang="plaintext"></p></span> +<span id="LC14" class="line" lang="plaintext"><p></span> +<span id="LC15" class="line" lang="plaintext">text in loose list</span> +<span id="LC16" class="line" lang="plaintext"></p></span> +<span id="LC17" class="line" lang="plaintext"></li></span> +<span id="LC18" class="line" lang="plaintext"></ul></span></code></pre> +<copy-code></copy-code> +</div> +<h2 data-sourcepos="133:1-133:15" dir="auto"> +<a id="user-content-front-matter" class="anchor" href="#front-matter" aria-hidden="true"></a>Front matter</h2> +<p data-sourcepos="135:1-136:121" dir="auto">See +<a href="https://docs.gitlab.com/ee/user/markdown.html#front-matter" rel="nofollow noreferrer noopener" target="_blank">Front matter</a> in the GitLab Flavored Markdown documentation.</p> +<p data-sourcepos="138:1-139:95" dir="auto">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.</p> +<p data-sourcepos="141:1-141:18" dir="auto">YAML front matter:</p> +<div class="gl-relative markdown-code-block js-markdown-code"> +<pre data-sourcepos="143:1-153:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" data-canonical-lang="example" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">---</span> +<span id="LC2" class="line" lang="plaintext">title: YAML front matter</span> +<span id="LC3" class="line" lang="plaintext">---</span> +<span id="LC4" class="line" lang="plaintext">.</span> +<span id="LC5" class="line" lang="plaintext"><pre></span> +<span id="LC6" class="line" lang="plaintext"><code></span> +<span id="LC7" class="line" lang="plaintext">title: YAML front matter</span> +<span id="LC8" class="line" lang="plaintext"></code></span> +<span id="LC9" class="line" lang="plaintext"></pre></span></code></pre> +<copy-code></copy-code> +</div> +<p data-sourcepos="155:1-155:18" dir="auto">TOML front matter:</p> +<div class="gl-relative markdown-code-block js-markdown-code"> +<pre data-sourcepos="157:1-167:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" data-canonical-lang="example" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">+++</span> +<span id="LC2" class="line" lang="plaintext">title: TOML front matter</span> +<span id="LC3" class="line" lang="plaintext">+++</span> +<span id="LC4" class="line" lang="plaintext">.</span> +<span id="LC5" class="line" lang="plaintext"><pre></span> +<span id="LC6" class="line" lang="plaintext"><code></span> +<span id="LC7" class="line" lang="plaintext">title: TOML front matter</span> +<span id="LC8" class="line" lang="plaintext"></code></span> +<span id="LC9" class="line" lang="plaintext"></pre></span></code></pre> +<copy-code></copy-code> +</div> +<p data-sourcepos="169:1-169:18" dir="auto">JSON front matter:</p> +<div class="gl-relative markdown-code-block js-markdown-code"> +<pre data-sourcepos="171:1-185:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" data-canonical-lang="example" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">;;;</span> +<span id="LC2" class="line" lang="plaintext">{</span> +<span id="LC3" class="line" lang="plaintext"> "title": "JSON front matter"</span> +<span id="LC4" class="line" lang="plaintext">}</span> +<span id="LC5" class="line" lang="plaintext">;;;</span> +<span id="LC6" class="line" lang="plaintext">.</span> +<span id="LC7" class="line" lang="plaintext"><pre></span> +<span id="LC8" class="line" lang="plaintext"><code></span> +<span id="LC9" class="line" lang="plaintext">{</span> +<span id="LC10" class="line" lang="plaintext"> "title": "JSON front matter"</span> +<span id="LC11" class="line" lang="plaintext">}</span> +<span id="LC12" class="line" lang="plaintext"></code></span> +<span id="LC13" class="line" lang="plaintext"></pre></span></code></pre> +<copy-code></copy-code> +</div> +<p data-sourcepos="187:1-187:66" dir="auto">Front matter blocks should be inserted at the top of the document:</p> +<div class="gl-relative markdown-code-block js-markdown-code"> +<pre data-sourcepos="189:1-199:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" data-canonical-lang="example" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">text</span> +<span id="LC2" class="line" lang="plaintext"></span> +<span id="LC3" class="line" lang="plaintext">---</span> +<span id="LC4" class="line" lang="plaintext">title: YAML front matter</span> +<span id="LC5" class="line" lang="plaintext">---</span> +<span id="LC6" class="line" lang="plaintext">.</span> +<span id="LC7" class="line" lang="plaintext"><p>text</p></span> +<span id="LC8" class="line" lang="plaintext"><hr></span> +<span id="LC9" class="line" lang="plaintext"><h2>title: YAML front matter</h2></span></code></pre> +<copy-code></copy-code> +</div> +<p data-sourcepos="201:1-201:74" dir="auto">Front matter block delimiters shouldn’t be preceded by space characters:</p> +<div class="gl-relative markdown-code-block js-markdown-code"> +<pre data-sourcepos="203:1-210:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" data-canonical-lang="example" v-pre="true"><code><span id="LC1" class="line" lang="plaintext"> ---</span> +<span id="LC2" class="line" lang="plaintext">title: YAML front matter</span> +<span id="LC3" class="line" lang="plaintext">---</span> +<span id="LC4" class="line" lang="plaintext">.</span> +<span id="LC5" class="line" lang="plaintext"><hr></span> +<span id="LC6" class="line" lang="plaintext"><h2>title: YAML front matter</h2></span></code></pre> +<copy-code></copy-code> +</div> +<h2 data-sourcepos="212:1-212:20" dir="auto"> +<a id="user-content-table-of-contents" class="anchor" href="#table-of-contents" aria-hidden="true"></a>Table of contents</h2> +<p data-sourcepos="214:1-216:46" dir="auto">See +<a href="https://docs.gitlab.com/ee/user/markdown.html#table-of-contents" rel="nofollow noreferrer noopener" target="_blank">table of contents</a> +in the GitLab Flavored Markdown documentation.</p> +<p data-sourcepos="218:1-219:58" dir="auto">A table of contents is an unordered list that links to subheadings in the document. +Add either the <code>[[_TOC_]]</code> or </p><ul class="section-nav"> +<li><a href="#introduction">Introduction</a></li> +<li> +<a href="#gitlab-official-specification-markdown">GitLab Official Specification Markdown</a><ul> +<li><a href="#footnotes">Footnotes</a></li> +<li><a href="#task-list-items">Task list items</a></li> +<li><a href="#front-matter">Front matter</a></li> +<li><a href="#table-of-contents">Table of contents</a></li> +</ul> +</li> +</ul> tag on its own line. +<div class="gl-relative markdown-code-block js-markdown-code"> +<pre data-sourcepos="221:1-238:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" data-canonical-lang="example" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">[TOC]</span> +<span id="LC2" class="line" lang="plaintext"></span> +<span id="LC3" class="line" lang="plaintext"># Heading 1</span> +<span id="LC4" class="line" lang="plaintext"></span> +<span id="LC5" class="line" lang="plaintext">## Heading 2</span> +<span id="LC6" class="line" lang="plaintext">.</span> +<span id="LC7" class="line" lang="plaintext"><nav></span> +<span id="LC8" class="line" lang="plaintext"> <ul></span> +<span id="LC9" class="line" lang="plaintext"> <li><a href="#heading-1">Heading 1</a></li></span> +<span id="LC10" class="line" lang="plaintext"> <ul></span> +<span id="LC11" class="line" lang="plaintext"> <li><a href="#heading-2">Heading 2</a></li></span> +<span id="LC12" class="line" lang="plaintext"> </ul></span> +<span id="LC13" class="line" lang="plaintext"> </ul></span> +<span id="LC14" class="line" lang="plaintext"></nav></span> +<span id="LC15" class="line" lang="plaintext"><h1>Heading 1</h1></span> +<span id="LC16" class="line" lang="plaintext"><h2>Heading 2</h2></span></code></pre> +<copy-code></copy-code> +</div> +<div class="gl-relative markdown-code-block js-markdown-code"> +<pre data-sourcepos="240:1-257:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" data-canonical-lang="example" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">[[_TOC_]]</span> +<span id="LC2" class="line" lang="plaintext"></span> +<span id="LC3" class="line" lang="plaintext"># Heading 1</span> +<span id="LC4" class="line" lang="plaintext"></span> +<span id="LC5" class="line" lang="plaintext">## Heading 2</span> +<span id="LC6" class="line" lang="plaintext">.</span> +<span id="LC7" class="line" lang="plaintext"><nav></span> +<span id="LC8" class="line" lang="plaintext"> <ul></span> +<span id="LC9" class="line" lang="plaintext"> <li><a href="#heading-1">Heading 1</a></li></span> +<span id="LC10" class="line" lang="plaintext"> <ul></span> +<span id="LC11" class="line" lang="plaintext"> <li><a href="#heading-2">Heading 2</a></li></span> +<span id="LC12" class="line" lang="plaintext"> </ul></span> +<span id="LC13" class="line" lang="plaintext"> </ul></span> +<span id="LC14" class="line" lang="plaintext"></nav></span> +<span id="LC15" class="line" lang="plaintext"><h1>Heading 1</h1></span> +<span id="LC16" class="line" lang="plaintext"><h2>Heading 2</h2></span></code></pre> +<copy-code></copy-code> +</div> +<p data-sourcepos="259:1-260:5" dir="auto">A table of contents is a block element. It should preceded and followed by a blank +line.</p> +<div class="gl-relative markdown-code-block js-markdown-code"> +<pre data-sourcepos="262:1-271:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" data-canonical-lang="example" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">[[_TOC_]]</span> +<span id="LC2" class="line" lang="plaintext">text</span> +<span id="LC3" class="line" lang="plaintext"></span> +<span id="LC4" class="line" lang="plaintext">text</span> +<span id="LC5" class="line" lang="plaintext">[TOC]</span> +<span id="LC6" class="line" lang="plaintext">.</span> +<span id="LC7" class="line" lang="plaintext"><p>[[<em>TOC</em>]]text</p></span> +<span id="LC8" class="line" lang="plaintext"><p>text[TOC]</p></span></code></pre> +<copy-code></copy-code> +</div> +<p data-sourcepos="273:1-273:60" dir="auto">A table of contents can be indented with up to three spaces.</p> +<div class="gl-relative markdown-code-block js-markdown-code"> +<pre data-sourcepos="275:1-286:32" class="code highlight js-syntax-highlight language-plaintext" lang="plaintext" data-canonical-lang="example" v-pre="true"><code><span id="LC1" class="line" lang="plaintext"> [[_TOC_]]</span> +<span id="LC2" class="line" lang="plaintext"></span> +<span id="LC3" class="line" lang="plaintext"># Heading 1</span> +<span id="LC4" class="line" lang="plaintext">.</span> +<span id="LC5" class="line" lang="plaintext"><nav></span> +<span id="LC6" class="line" lang="plaintext"> <ul></span> +<span id="LC7" class="line" lang="plaintext"> <li><a href="#heading-1">Heading 1</a></li></span> +<span id="LC8" class="line" lang="plaintext"> </ul></span> +<span id="LC9" class="line" lang="plaintext"></nav></span> +<span id="LC10" class="line" lang="plaintext"><h1>Heading 1</h1></span></code></pre> +<copy-code></copy-code> +</div> + diff --git a/glfm_specification/output_spec/spec.txt b/glfm_specification/output_spec/spec.txt new file mode 100644 index 00000000000..e16975ac51f --- /dev/null +++ b/glfm_specification/output_spec/spec.txt @@ -0,0 +1,287 @@ +--- +title: GitLab Flavored Markdown (GLFM) Spec +version: alpha +... +# Introduction + +TODO: Write a GitLab-specific version of the GitHub Flavored Markdown intro section. + +<!-- BEGIN TESTS --> +# 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 +. +<p> +footnote reference tag +<sup> +<a href="#fn-fortytwo-42" id="fnref-fortytwo-42" data-footnote-ref> +1 +</a> +</sup> +</p> +<section data-footnotes> +<ol> +<li id="fn-fortytwo-42"> +<p> +footnote text +<a href="#fnref-fortytwo-42" data-footnote-backref> +</a> +</p> +</li> +</ol> +</section> +```````````````````````````````` + +## 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 +. +<ul> +<li> +<task-button/> +<input type="checkbox" disabled/> +incomplete +</li> +</ul> +```````````````````````````````` + +Completed task: + +```````````````````````````````` example gitlab +- [x] completed +. +<ul> +<li> +<task-button/> +<input type="checkbox" checked disabled/> +completed +</li> +</ul> +```````````````````````````````` + +Inapplicable task: + +```````````````````````````````` example gitlab +- [~] inapplicable +. +<ul> +<li> +<task-button/> +<input type="checkbox" data-inapplicable disabled> +<s> +inapplicable +</s> +</li> +</ul> +```````````````````````````````` + +Inapplicable task in a "loose" list. Note that the `<del>` tag is not applied to the +loose text; it has strikethrough applied with CSS. + +```````````````````````````````` example gitlab +- [~] inapplicable + + text in loose list +. +<ul> +<li> +<p> +<task-button/> +<input type="checkbox" data-inapplicable disabled> +<s> +inapplicable +</s> +</p> +<p> +text in loose list +</p> +</li> +</ul> +```````````````````````````````` + +## 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 +--- +. +<pre> +<code> +title: YAML front matter +</code> +</pre> +```````````````````````````````` + +TOML front matter: + +```````````````````````````````` example gitlab ++++ +title: TOML front matter ++++ +. +<pre> +<code> +title: TOML front matter +</code> +</pre> +```````````````````````````````` + +JSON front matter: + +```````````````````````````````` example gitlab +;;; +{ + "title": "JSON front matter" +} +;;; +. +<pre> +<code> +{ + "title": "JSON front matter" +} +</code> +</pre> +```````````````````````````````` + +Front matter blocks should be inserted at the top of the document: + +```````````````````````````````` example gitlab +text + +--- +title: YAML front matter +--- +. +<p>text</p> +<hr> +<h2>title: YAML front matter</h2> +```````````````````````````````` + +Front matter block delimiters shouldn’t be preceded by space characters: + +```````````````````````````````` example gitlab + --- +title: YAML front matter +--- +. +<hr> +<h2>title: YAML front matter</h2> +```````````````````````````````` + +## 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 +. +<nav> + <ul> + <li><a href="#heading-1">Heading 1</a></li> + <ul> + <li><a href="#heading-2">Heading 2</a></li> + </ul> + </ul> +</nav> +<h1>Heading 1</h1> +<h2>Heading 2</h2> +```````````````````````````````` + +```````````````````````````````` example gitlab +[[_TOC_]] + +# Heading 1 + +## Heading 2 +. +<nav> + <ul> + <li><a href="#heading-1">Heading 1</a></li> + <ul> + <li><a href="#heading-2">Heading 2</a></li> + </ul> + </ul> +</nav> +<h1>Heading 1</h1> +<h2>Heading 2</h2> +```````````````````````````````` + +A table of contents is a block element. It should preceded and followed by a blank +line. + +```````````````````````````````` example gitlab +[[_TOC_]] +text + +text +[TOC] +. +<p>[[<em>TOC</em>]]text</p> +<p>text[TOC]</p> +```````````````````````````````` + +A table of contents can be indented with up to three spaces. + +```````````````````````````````` example gitlab + [[_TOC_]] + +# Heading 1 +. +<nav> + <ul> + <li><a href="#heading-1">Heading 1</a></li> + </ul> +</nav> +<h1>Heading 1</h1> +```````````````````````````````` +<!-- END TESTS --> |