diff options
Diffstat (limited to 'glfm_specification/output')
-rw-r--r-- | glfm_specification/output/spec.txt | 208 |
1 files changed, 198 insertions, 10 deletions
diff --git a/glfm_specification/output/spec.txt b/glfm_specification/output/spec.txt index 32cb6a0594e..af4eba06758 100644 --- a/glfm_specification/output/spec.txt +++ b/glfm_specification/output/spec.txt @@ -9615,7 +9615,7 @@ examples may be split into multiple top-level headings in the future. 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 +```````````````````````````````` example gitlab footnote reference tag [^fortytwo] [^fortytwo]: footnote text @@ -9657,7 +9657,7 @@ The following are some basic examples; more examples may be added in the future. Incomplete task: -```````````````````````````````` example gitlab tasklist +```````````````````````````````` example gitlab - [ ] incomplete . <ul> @@ -9671,7 +9671,7 @@ incomplete Completed task: -```````````````````````````````` example gitlab tasklist +```````````````````````````````` example gitlab - [x] completed . <ul> @@ -9685,7 +9685,7 @@ completed Inapplicable task: -```````````````````````````````` example gitlab tasklist +```````````````````````````````` example gitlab - [~] inapplicable . <ul> @@ -9702,7 +9702,7 @@ inapplicable 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 tasklist +```````````````````````````````` example gitlab - [~] inapplicable text in loose list @@ -9733,7 +9733,7 @@ This data can be used by static site generators like Jekyll, Hugo, and many othe YAML front matter: -```````````````````````````````` example gitlab frontmatter +```````````````````````````````` example gitlab --- title: YAML front matter --- @@ -9747,7 +9747,7 @@ title: YAML front matter TOML front matter: -```````````````````````````````` example gitlab frontmatter +```````````````````````````````` example gitlab +++ title: TOML front matter +++ @@ -9761,7 +9761,7 @@ title: TOML front matter JSON front matter: -```````````````````````````````` example gitlab frontmatter +```````````````````````````````` example gitlab ;;; { "title": "JSON front matter" @@ -9779,7 +9779,7 @@ JSON front matter: Front matter blocks should be inserted at the top of the document: -```````````````````````````````` example gitlab frontmatter +```````````````````````````````` example gitlab text --- @@ -9793,7 +9793,7 @@ title: YAML front matter Front matter block delimiters shouldn’t be preceded by space characters: -```````````````````````````````` example gitlab frontmatter +```````````````````````````````` example gitlab --- title: YAML front matter --- @@ -9802,6 +9802,194 @@ title: YAML front matter <h2>title: YAML front matter</h2> ```````````````````````````````` +## Audio + +See +[audio](https://docs.gitlab.com/ee/user/markdown.html#audio) in the GitLab Flavored Markdown documentation. + +GLFM renders image elements as an audio player as long as the resource’s file extension is +one of the following supported audio extensions `.mp3`, `.oga`, `.ogg`, `.spx`, and `.wav`. +Audio ignore the alternative text part of an image declaration. + +```````````````````````````````` example gitlab +![audio](audio.oga "audio title") +. +<p><audio src="audio.oga" title="audio title"></audio></p> +```````````````````````````````` + +Reference definitions work audio as well: + +```````````````````````````````` example gitlab +[audio]: audio.oga "audio title" + +![audio][audio] +. +<p><audio src="audio.oga" title="audio title"></audio></p> +```````````````````````````````` + +## Video + +See +[videos](https://docs.gitlab.com/ee/user/markdown.html#videos) in the GitLab Flavored Markdown documentation. + +GLFM renders image elements as a video player as long as the resource’s file extension is +one of the following supported video extensions `.mp4`, `.m4v`, `.mov`, `.webm`, and `.ogv`. +Videos ignore the alternative text part of an image declaration. + + +```````````````````````````````` example gitlab +![video](video.m4v "video title") +. +<p><video src="video.m4v" title="video title"></video></p> +```````````````````````````````` + +Reference definitions work video as well: + +```````````````````````````````` example gitlab +[video]: video.mov "video title" + +![video][video] +. +<p><video src="video.mov" title="video title"></video></p> +```````````````````````````````` + +## 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> +```````````````````````````````` + +# Examples Using Internal Extensions + +## Markdown Preview API Request Overrides + +This section contains examples of all controllers which use `PreviewMarkdown` module +and use different `markdown_context_params`. They exercise the various `preview_markdown` +endpoints via `glfm_example_metadata.yml`. + + +`preview_markdown` exercising `groups` API endpoint and `UploadLinkFilter`: + +```````````````````````````````` example gitlab +[groups-test-file](/uploads/groups-test-file) +. +<p><a href="groups-test-file">groups-test-file</a></p> +```````````````````````````````` + +`preview_markdown` exercising `projects` API endpoint and `RepositoryLinkFilter`: + +```````````````````````````````` example gitlab +[projects-test-file](projects-test-file) +. +<p><a href="projects-test-file">projects-test-file</a></p> +```````````````````````````````` + +`preview_markdown` exercising `projects` API endpoint and `SnippetReferenceFilter`: + +```````````````````````````````` example gitlab +This project snippet ID reference IS filtered: $88888 +. +<p>This project snippet ID reference IS filtered: $88888</p> +```````````````````````````````` + +`preview_markdown` exercising personal (non-project) `snippets` API endpoint. This is +only used by the comment field on personal snippets. It has no unique custom markdown +extension behavior, and specifically does not render snippet references via +`SnippetReferenceFilter`, even if the ID is valid. + +```````````````````````````````` example gitlab +This personal snippet ID reference is not filtered: $99999 +. +<p>This personal snippet ID reference is not filtered: $99999</p> +```````````````````````````````` + +`preview_markdown` exercising project `wikis` API endpoint and `WikiLinkFilter`: + +```````````````````````````````` example gitlab +[project-wikis-test-file](project-wikis-test-file) +. +<p><a href="project-wikis-test-file">project-wikis-test-file</a></p> +```````````````````````````````` + +`preview_markdown` exercising group `wikis` API endpoint and `WikiLinkFilter`. This example +also requires an EE license enabling the `group_wikis` feature: + +```````````````````````````````` example gitlab +[group-wikis-test-file](group-wikis-test-file) +. +<p><a href="group-wikis-test-file">group-wikis-test-file</a></p> +```````````````````````````````` + <!-- END TESTS --> # Appendix: A parsing strategy |