summaryrefslogtreecommitdiff
path: root/glfm_specification
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-23 00:09:41 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-23 00:09:41 +0000
commit74d4d931ace289a65c8d1e9e0641622c7568d4a0 (patch)
treeb53c02cd011a1e9e0e4454bea0f205822f3c03df /glfm_specification
parentc4a9ca5ffca17bd874dd77014e9f2d607c94b06c (diff)
downloadgitlab-ce-74d4d931ace289a65c8d1e9e0641622c7568d4a0.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'glfm_specification')
-rw-r--r--glfm_specification/example_snapshots/examples_index.yml12
-rw-r--r--glfm_specification/example_snapshots/html.yml30
-rw-r--r--glfm_specification/example_snapshots/markdown.yml12
-rw-r--r--glfm_specification/example_snapshots/prosemirror_json.yml108
-rw-r--r--glfm_specification/input/gitlab_flavored_markdown/glfm_canonical_examples.txt51
-rw-r--r--glfm_specification/output/spec.txt51
6 files changed, 264 insertions, 0 deletions
diff --git a/glfm_specification/example_snapshots/examples_index.yml b/glfm_specification/example_snapshots/examples_index.yml
index 4c112338352..bd295baaad0 100644
--- a/glfm_specification/example_snapshots/examples_index.yml
+++ b/glfm_specification/example_snapshots/examples_index.yml
@@ -2042,3 +2042,15 @@
07_03_00__gitlab_specific_markdown__front_matter__005:
spec_txt_example_position: 683
source_specification: gitlab
+07_04_00__gitlab_specific_markdown__audio__001:
+ spec_txt_example_position: 684
+ source_specification: gitlab
+07_04_00__gitlab_specific_markdown__audio__002:
+ spec_txt_example_position: 685
+ source_specification: gitlab
+07_05_00__gitlab_specific_markdown__video__001:
+ spec_txt_example_position: 686
+ source_specification: gitlab
+07_05_00__gitlab_specific_markdown__video__002:
+ spec_txt_example_position: 687
+ source_specification: gitlab
diff --git a/glfm_specification/example_snapshots/html.yml b/glfm_specification/example_snapshots/html.yml
index 9aeb54ef4de..196cd4f748d 100644
--- a/glfm_specification/example_snapshots/html.yml
+++ b/glfm_specification/example_snapshots/html.yml
@@ -7820,3 +7820,33 @@
wysiwyg: |-
<hr>
<h2>title: YAML front matter</h2>
+07_04_00__gitlab_specific_markdown__audio__001:
+ canonical: |
+ <p><audio src="audio.oga" title="audio title"></audio></p>
+ static: |-
+ <p data-sourcepos="1:1-1:33" dir="auto"><span class="media-container audio-container"><audio src="audio.oga" controls="true" data-setup="{}" data-title="audio title"></audio><a href="audio.oga" target="_blank" rel="noopener noreferrer" title="Download 'audio title'">audio title</a></span></p>
+ wysiwyg: |-
+ <p><span class="media-container audio-container"><audio src="audio.oga" controls="true" data-setup="{}" data-title="audio"></audio><a href="audio.oga">audio</a></span></p>
+07_04_00__gitlab_specific_markdown__audio__002:
+ canonical: |
+ <p><audio src="audio.oga" title="audio title"></audio></p>
+ static: |-
+ <p data-sourcepos="3:1-3:15" dir="auto"><span class="media-container audio-container"><audio src="audio.oga" controls="true" data-setup="{}" data-title="audio title"></audio><a href="audio.oga" target="_blank" rel="noopener noreferrer" title="Download 'audio title'">audio title</a></span></p>
+ wysiwyg: |-
+ <pre>[audio]: audio.oga "audio title"</pre>
+ <p><span class="media-container audio-container"><audio src="audio.oga" controls="true" data-setup="{}" data-title="audio"></audio><a href="audio.oga">audio</a></span></p>
+07_05_00__gitlab_specific_markdown__video__001:
+ canonical: |
+ <p><video src="video.m4v" title="video title"></video></p>
+ static: |-
+ <p data-sourcepos="1:1-1:33" dir="auto"><span class="media-container video-container"><video src="video.m4v" controls="true" data-setup="{}" data-title="video title" width="400" preload="metadata"></video><a href="video.m4v" target="_blank" rel="noopener noreferrer" title="Download 'video title'">video title</a></span></p>
+ wysiwyg: |-
+ <p><span class="media-container video-container"><video src="video.m4v" controls="true" data-setup="{}" data-title="video"></video><a href="video.m4v">video</a></span></p>
+07_05_00__gitlab_specific_markdown__video__002:
+ canonical: |
+ <p><video src="video.mov" title="video title"></video></p>
+ static: |-
+ <p data-sourcepos="3:1-3:15" dir="auto"><span class="media-container video-container"><video src="video.mov" controls="true" data-setup="{}" data-title="video title" width="400" preload="metadata"></video><a href="video.mov" target="_blank" rel="noopener noreferrer" title="Download 'video title'">video title</a></span></p>
+ wysiwyg: |-
+ <pre>[video]: video.mov "video title"</pre>
+ <p><span class="media-container video-container"><video src="video.mov" controls="true" data-setup="{}" data-title="video"></video><a href="video.mov">video</a></span></p>
diff --git a/glfm_specification/example_snapshots/markdown.yml b/glfm_specification/example_snapshots/markdown.yml
index 0d2387434d1..c2b2caacb5b 100644
--- a/glfm_specification/example_snapshots/markdown.yml
+++ b/glfm_specification/example_snapshots/markdown.yml
@@ -2227,3 +2227,15 @@
---
title: YAML front matter
---
+07_04_00__gitlab_specific_markdown__audio__001: |
+ ![audio](audio.oga "audio title")
+07_04_00__gitlab_specific_markdown__audio__002: |
+ [audio]: audio.oga "audio title"
+
+ ![audio][audio]
+07_05_00__gitlab_specific_markdown__video__001: |
+ ![video](video.m4v "video title")
+07_05_00__gitlab_specific_markdown__video__002: |
+ [video]: video.mov "video title"
+
+ ![video][video]
diff --git a/glfm_specification/example_snapshots/prosemirror_json.yml b/glfm_specification/example_snapshots/prosemirror_json.yml
index 35f8314b1bc..02330019a8d 100644
--- a/glfm_specification/example_snapshots/prosemirror_json.yml
+++ b/glfm_specification/example_snapshots/prosemirror_json.yml
@@ -20782,3 +20782,111 @@
}
]
}
+07_04_00__gitlab_specific_markdown__audio__001: |-
+ {
+ "type": "doc",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "audio",
+ "attrs": {
+ "uploading": false,
+ "src": "audio.oga",
+ "canonicalSrc": "audio.oga",
+ "alt": "audio"
+ }
+ }
+ ]
+ }
+ ]
+ }
+07_04_00__gitlab_specific_markdown__audio__002: |-
+ {
+ "type": "doc",
+ "content": [
+ {
+ "type": "referenceDefinition",
+ "attrs": {
+ "identifier": "audio",
+ "url": "audio.oga",
+ "title": "audio title"
+ },
+ "content": [
+ {
+ "type": "text",
+ "text": "[audio]: audio.oga \"audio title\""
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "audio",
+ "attrs": {
+ "uploading": false,
+ "src": "audio.oga",
+ "canonicalSrc": "audio",
+ "alt": "audio"
+ }
+ }
+ ]
+ }
+ ]
+ }
+07_05_00__gitlab_specific_markdown__video__001: |-
+ {
+ "type": "doc",
+ "content": [
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "video",
+ "attrs": {
+ "uploading": false,
+ "src": "video.m4v",
+ "canonicalSrc": "video.m4v",
+ "alt": "video"
+ }
+ }
+ ]
+ }
+ ]
+ }
+07_05_00__gitlab_specific_markdown__video__002: |-
+ {
+ "type": "doc",
+ "content": [
+ {
+ "type": "referenceDefinition",
+ "attrs": {
+ "identifier": "video",
+ "url": "video.mov",
+ "title": "video title"
+ },
+ "content": [
+ {
+ "type": "text",
+ "text": "[video]: video.mov \"video title\""
+ }
+ ]
+ },
+ {
+ "type": "paragraph",
+ "content": [
+ {
+ "type": "video",
+ "attrs": {
+ "uploading": false,
+ "src": "video.mov",
+ "canonicalSrc": "video",
+ "alt": "video"
+ }
+ }
+ ]
+ }
+ ]
+ }
diff --git a/glfm_specification/input/gitlab_flavored_markdown/glfm_canonical_examples.txt b/glfm_specification/input/gitlab_flavored_markdown/glfm_canonical_examples.txt
index 3fa59a9f7b1..fd540a905bd 100644
--- a/glfm_specification/input/gitlab_flavored_markdown/glfm_canonical_examples.txt
+++ b/glfm_specification/input/gitlab_flavored_markdown/glfm_canonical_examples.txt
@@ -199,3 +199,54 @@ title: YAML front matter
<hr>
<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](audio.oga "audio title")
+.
+<p><audio src="audio.oga" title="audio title"></audio></p>
+````````````````````````````````
+
+Reference definitions work audio as well:
+
+```````````````````````````````` example gitlab audio
+[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](video.m4v "video title")
+.
+<p><video src="video.m4v" title="video title"></video></p>
+````````````````````````````````
+
+Reference definitions work video as well:
+
+```````````````````````````````` example gitlab video
+[video]: video.mov "video title"
+
+![video][video]
+.
+<p><video src="video.mov" title="video title"></video></p>
+````````````````````````````````
diff --git a/glfm_specification/output/spec.txt b/glfm_specification/output/spec.txt
index 49018b02220..2939e0d2fbd 100644
--- a/glfm_specification/output/spec.txt
+++ b/glfm_specification/output/spec.txt
@@ -9802,6 +9802,57 @@ 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](audio.oga "audio title")
+.
+<p><audio src="audio.oga" title="audio title"></audio></p>
+````````````````````````````````
+
+Reference definitions work audio as well:
+
+```````````````````````````````` example gitlab audio
+[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](video.m4v "video title")
+.
+<p><video src="video.m4v" title="video title"></video></p>
+````````````````````````````````
+
+Reference definitions work video as well:
+
+```````````````````````````````` example gitlab video
+[video]: video.mov "video title"
+
+![video][video]
+.
+<p><video src="video.mov" title="video title"></video></p>
+````````````````````````````````
+
<!-- END TESTS -->
# Appendix: A parsing strategy