304 lines
23 KiB
HTML
304 lines
23 KiB
HTML
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="1:1-4:3" lang="yaml" class="code highlight js-syntax-highlight language-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-29:32" lang="plaintext" class="code highlight js-syntax-highlight language-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></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="31:1-51:32" lang="plaintext" class="code highlight js-syntax-highlight language-plaintext" data-canonical-lang="" v-pre="true"><code><span id="LC1" class="line" lang="plaintext"><p></span>
|
||
<span id="LC2" class="line" lang="plaintext">footnote reference tag</span>
|
||
<span id="LC3" class="line" lang="plaintext"><sup></span>
|
||
<span id="LC4" class="line" lang="plaintext"><a href="#fn-fortytwo-42" id="fnref-fortytwo-42" data-footnote-ref></span>
|
||
<span id="LC5" class="line" lang="plaintext">1</span>
|
||
<span id="LC6" class="line" lang="plaintext"></a></span>
|
||
<span id="LC7" class="line" lang="plaintext"></sup></span>
|
||
<span id="LC8" class="line" lang="plaintext"></p></span>
|
||
<span id="LC9" class="line" lang="plaintext"><section data-footnotes></span>
|
||
<span id="LC10" class="line" lang="plaintext"><ol></span>
|
||
<span id="LC11" class="line" lang="plaintext"><li id="fn-fortytwo-42"></span>
|
||
<span id="LC12" class="line" lang="plaintext"><p></span>
|
||
<span id="LC13" class="line" lang="plaintext">footnote text</span>
|
||
<span id="LC14" class="line" lang="plaintext"><a href="#fnref-fortytwo-42" data-footnote-backref></span>
|
||
<span id="LC15" class="line" lang="plaintext"></a></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"></ol></span>
|
||
<span id="LC19" class="line" lang="plaintext"></section></span></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<h2 data-sourcepos="53:1-53: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="55:1-56: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="58:1-61: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="63:1-63:85" dir="auto">Some of the behavior of task list items is implemented as client-side JavaScript/CSS.</p>
|
||
<p data-sourcepos="65:1-65:80" dir="auto">The following are some basic examples; more examples may be added in the future.</p>
|
||
<p data-sourcepos="67:1-67:16" dir="auto">Incomplete task:</p>
|
||
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="69:1-71:32" lang="plaintext" class="code highlight js-syntax-highlight language-plaintext" data-canonical-lang="example" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">- [ ] incomplete</span></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="73:1-81:32" lang="plaintext" class="code highlight js-syntax-highlight language-plaintext" data-canonical-lang="" v-pre="true"><code><span id="LC1" class="line" lang="plaintext"><ul></span>
|
||
<span id="LC2" class="line" lang="plaintext"><li></span>
|
||
<span id="LC3" class="line" lang="plaintext"><task-button/></span>
|
||
<span id="LC4" class="line" lang="plaintext"><input type="checkbox" disabled/></span>
|
||
<span id="LC5" class="line" lang="plaintext">incomplete</span>
|
||
<span id="LC6" class="line" lang="plaintext"></li></span>
|
||
<span id="LC7" class="line" lang="plaintext"></ul></span></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<p data-sourcepos="83:1-83:15" dir="auto">Completed task:</p>
|
||
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="85:1-87:32" lang="plaintext" class="code highlight js-syntax-highlight language-plaintext" data-canonical-lang="example" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">- [x] completed</span></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="89:1-97:32" lang="plaintext" class="code highlight js-syntax-highlight language-plaintext" data-canonical-lang="" v-pre="true"><code><span id="LC1" class="line" lang="plaintext"><ul></span>
|
||
<span id="LC2" class="line" lang="plaintext"><li></span>
|
||
<span id="LC3" class="line" lang="plaintext"><task-button/></span>
|
||
<span id="LC4" class="line" lang="plaintext"><input type="checkbox" checked disabled/></span>
|
||
<span id="LC5" class="line" lang="plaintext">completed</span>
|
||
<span id="LC6" class="line" lang="plaintext"></li></span>
|
||
<span id="LC7" class="line" lang="plaintext"></ul></span></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<p data-sourcepos="99:1-99:18" dir="auto">Inapplicable task:</p>
|
||
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="101:1-103:32" lang="plaintext" class="code highlight js-syntax-highlight language-plaintext" data-canonical-lang="example" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">- [~] inapplicable</span></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="105:1-115:32" lang="plaintext" class="code highlight js-syntax-highlight language-plaintext" data-canonical-lang="" v-pre="true"><code><span id="LC1" class="line" lang="plaintext"><ul></span>
|
||
<span id="LC2" class="line" lang="plaintext"><li></span>
|
||
<span id="LC3" class="line" lang="plaintext"><task-button/></span>
|
||
<span id="LC4" class="line" lang="plaintext"><input type="checkbox" data-inapplicable disabled></span>
|
||
<span id="LC5" class="line" lang="plaintext"><s></span>
|
||
<span id="LC6" class="line" lang="plaintext">inapplicable</span>
|
||
<span id="LC7" class="line" lang="plaintext"></s></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="117:1-118: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="120:1-124:32" lang="plaintext" class="code highlight js-syntax-highlight language-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></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="126:1-141:32" lang="plaintext" class="code highlight js-syntax-highlight language-plaintext" data-canonical-lang="" v-pre="true"><code><span id="LC1" class="line" lang="plaintext"><ul></span>
|
||
<span id="LC2" class="line" lang="plaintext"><li></span>
|
||
<span id="LC3" class="line" lang="plaintext"><p></span>
|
||
<span id="LC4" class="line" lang="plaintext"><task-button/></span>
|
||
<span id="LC5" class="line" lang="plaintext"><input type="checkbox" data-inapplicable disabled></span>
|
||
<span id="LC6" class="line" lang="plaintext"><s></span>
|
||
<span id="LC7" class="line" lang="plaintext">inapplicable</span>
|
||
<span id="LC8" class="line" lang="plaintext"></s></span>
|
||
<span id="LC9" class="line" lang="plaintext"></p></span>
|
||
<span id="LC10" class="line" lang="plaintext"><p></span>
|
||
<span id="LC11" class="line" lang="plaintext">text in loose list</span>
|
||
<span id="LC12" class="line" lang="plaintext"></p></span>
|
||
<span id="LC13" class="line" lang="plaintext"></li></span>
|
||
<span id="LC14" class="line" lang="plaintext"></ul></span></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<h2 data-sourcepos="143:1-143:15" dir="auto">
|
||
<a id="user-content-front-matter" class="anchor" href="#front-matter" aria-hidden="true"></a>Front matter</h2>
|
||
<p data-sourcepos="145:1-146: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="148:1-149: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="151:1-151:18" dir="auto">YAML front matter:</p>
|
||
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="153:1-157:32" lang="plaintext" class="code highlight js-syntax-highlight language-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></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="159:1-165:32" lang="plaintext" class="code highlight js-syntax-highlight language-plaintext" data-canonical-lang="" v-pre="true"><code><span id="LC1" class="line" lang="plaintext"><pre></span>
|
||
<span id="LC2" class="line" lang="plaintext"><code></span>
|
||
<span id="LC3" class="line" lang="plaintext">title: YAML front matter</span>
|
||
<span id="LC4" class="line" lang="plaintext"></code></span>
|
||
<span id="LC5" class="line" lang="plaintext"></pre></span></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<p data-sourcepos="167:1-167:18" dir="auto">TOML front matter:</p>
|
||
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="169:1-173:32" lang="plaintext" class="code highlight js-syntax-highlight language-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></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="175:1-181:32" lang="plaintext" class="code highlight js-syntax-highlight language-plaintext" data-canonical-lang="" v-pre="true"><code><span id="LC1" class="line" lang="plaintext"><pre></span>
|
||
<span id="LC2" class="line" lang="plaintext"><code></span>
|
||
<span id="LC3" class="line" lang="plaintext">title: TOML front matter</span>
|
||
<span id="LC4" class="line" lang="plaintext"></code></span>
|
||
<span id="LC5" class="line" lang="plaintext"></pre></span></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<p data-sourcepos="183:1-183:18" dir="auto">JSON front matter:</p>
|
||
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="185:1-191:32" lang="plaintext" class="code highlight js-syntax-highlight language-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></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="193:1-201:32" lang="plaintext" class="code highlight js-syntax-highlight language-plaintext" data-canonical-lang="" v-pre="true"><code><span id="LC1" class="line" lang="plaintext"><pre></span>
|
||
<span id="LC2" class="line" lang="plaintext"><code></span>
|
||
<span id="LC3" class="line" lang="plaintext">{</span>
|
||
<span id="LC4" class="line" lang="plaintext"> "title": "JSON front matter"</span>
|
||
<span id="LC5" class="line" lang="plaintext">}</span>
|
||
<span id="LC6" class="line" lang="plaintext"></code></span>
|
||
<span id="LC7" class="line" lang="plaintext"></pre></span></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<p data-sourcepos="203:1-203: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="205:1-211:32" lang="plaintext" class="code highlight js-syntax-highlight language-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></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="213:1-217:32" lang="plaintext" class="code highlight js-syntax-highlight language-plaintext" data-canonical-lang="" v-pre="true"><code><span id="LC1" class="line" lang="plaintext"><p>text</p></span>
|
||
<span id="LC2" class="line" lang="plaintext"><hr></span>
|
||
<span id="LC3" class="line" lang="plaintext"><h2>title: YAML front matter</h2></span></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<p data-sourcepos="219:1-219: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="221:1-225:32" lang="plaintext" class="code highlight js-syntax-highlight language-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></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="227:1-230:32" lang="plaintext" class="code highlight js-syntax-highlight language-plaintext" data-canonical-lang="" v-pre="true"><code><span id="LC1" class="line" lang="plaintext"><hr></span>
|
||
<span id="LC2" class="line" lang="plaintext"><h2>title: YAML front matter</h2></span></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<h2 data-sourcepos="232:1-232: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="234:1-236: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="238:1-239: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="241:1-247:32" lang="plaintext" class="code highlight js-syntax-highlight language-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></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="249:1-260:32" lang="plaintext" class="code highlight js-syntax-highlight language-plaintext" data-canonical-lang="" v-pre="true"><code><span id="LC1" class="line" lang="plaintext"><nav></span>
|
||
<span id="LC2" class="line" lang="plaintext"> <ul></span>
|
||
<span id="LC3" class="line" lang="plaintext"> <li><a href="#heading-1">Heading 1</a></li></span>
|
||
<span id="LC4" class="line" lang="plaintext"> <ul></span>
|
||
<span id="LC5" class="line" lang="plaintext"> <li><a href="#heading-2">Heading 2</a></li></span>
|
||
<span id="LC6" class="line" lang="plaintext"> </ul></span>
|
||
<span id="LC7" class="line" lang="plaintext"> </ul></span>
|
||
<span id="LC8" class="line" lang="plaintext"></nav></span>
|
||
<span id="LC9" class="line" lang="plaintext"><h1>Heading 1</h1></span>
|
||
<span id="LC10" 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="262:1-268:32" lang="plaintext" class="code highlight js-syntax-highlight language-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></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="270:1-281:32" lang="plaintext" class="code highlight js-syntax-highlight language-plaintext" data-canonical-lang="" v-pre="true"><code><span id="LC1" class="line" lang="plaintext"><nav></span>
|
||
<span id="LC2" class="line" lang="plaintext"> <ul></span>
|
||
<span id="LC3" class="line" lang="plaintext"> <li><a href="#heading-1">Heading 1</a></li></span>
|
||
<span id="LC4" class="line" lang="plaintext"> <ul></span>
|
||
<span id="LC5" class="line" lang="plaintext"> <li><a href="#heading-2">Heading 2</a></li></span>
|
||
<span id="LC6" class="line" lang="plaintext"> </ul></span>
|
||
<span id="LC7" class="line" lang="plaintext"> </ul></span>
|
||
<span id="LC8" class="line" lang="plaintext"></nav></span>
|
||
<span id="LC9" class="line" lang="plaintext"><h1>Heading 1</h1></span>
|
||
<span id="LC10" class="line" lang="plaintext"><h2>Heading 2</h2></span></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<p data-sourcepos="283:1-284: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="286:1-292:32" lang="plaintext" class="code highlight js-syntax-highlight language-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></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="294:1-297:32" lang="plaintext" class="code highlight js-syntax-highlight language-plaintext" data-canonical-lang="" v-pre="true"><code><span id="LC1" class="line" lang="plaintext"><p>[[<em>TOC</em>]]text</p></span>
|
||
<span id="LC2" class="line" lang="plaintext"><p>text[TOC]</p></span></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<p data-sourcepos="299:1-299: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="301:1-305:32" lang="plaintext" class="code highlight js-syntax-highlight language-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></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
<div class="gl-relative markdown-code-block js-markdown-code">
|
||
<pre data-sourcepos="307:1-314:32" lang="plaintext" class="code highlight js-syntax-highlight language-plaintext" data-canonical-lang="" v-pre="true"><code><span id="LC1" class="line" lang="plaintext"><nav></span>
|
||
<span id="LC2" class="line" lang="plaintext"> <ul></span>
|
||
<span id="LC3" class="line" lang="plaintext"> <li><a href="#heading-1">Heading 1</a></li></span>
|
||
<span id="LC4" class="line" lang="plaintext"> </ul></span>
|
||
<span id="LC5" class="line" lang="plaintext"></nav></span>
|
||
<span id="LC6" class="line" lang="plaintext"><h1>Heading 1</h1></span></code></pre>
|
||
<copy-code></copy-code>
|
||
</div>
|
||
|